diff --git a/oslash/either.py b/oslash/either.py index 47b5448..533639a 100644 --- a/oslash/either.py +++ b/oslash/either.py @@ -98,7 +98,7 @@ def __eq__(self, other) -> bool: return isinstance(other, Right) and self._value == other._value def __str__(self) -> str: - return "Right %s" % self._value + return f"Right {self._value}" class Left(Either[TSource, TError]): @@ -129,7 +129,7 @@ def __eq__(self, other) -> bool: return isinstance(other, Left) and self._error == other._error def __str__(self) -> str: - return "Left: %s" % self._error + return f"Left: {self._error}" assert(isinstance(Either, Functor)) diff --git a/oslash/identity.py b/oslash/identity.py index 33dfde5..4248b2d 100644 --- a/oslash/identity.py +++ b/oslash/identity.py @@ -52,7 +52,7 @@ def __eq__(self, other) -> bool: return self._value == other() def __str__(self) -> str: - return "Identity(%s)" % self._value + return f"Identity({self._value})" def __repr__(self) -> str: return str(self) diff --git a/oslash/maybe.py b/oslash/maybe.py index dbb65c9..a2f1158 100644 --- a/oslash/maybe.py +++ b/oslash/maybe.py @@ -166,7 +166,7 @@ def __eq__(self, other) -> bool: return bool(other.map(lambda other_value: other_value == self._value)) def __str__(self) -> str: - return "Just %s" % self._value + return f"Just {self._value}" def __repr__(self) -> str: return str(self)