Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions oslash/either.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion oslash/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion oslash/maybe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down