Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhammerl committed Jul 30, 2024
1 parent 62e6749 commit 5b0430b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions resultify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ def __init__(self, message: str) -> None:


def resultify(*errors: Type[E]):
def decorator(
function: Callable[..., T]
) -> Callable[..., Union[Ok[T], Err[E]]]:
def decorator(function: Callable[..., T]) -> Callable[..., Union[Ok[T], Err[E]]]:
@wraps(function)
def inner(*args, **kwargs):
try:
Expand Down
2 changes: 1 addition & 1 deletion test/test_resultify.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_hash(self):
assert len({Ok("a"), Err("a")}) == 2

def test_repr(self):
assert Ok(u"£10") == eval(repr(Ok(u"£10")))
assert Ok("£10") == eval(repr(Ok("£10")))
assert Ok("£10") == eval(repr(Ok("£10")))

def test_isinstance_result_type(self):
Expand Down

0 comments on commit 5b0430b

Please sign in to comment.