Skip to content

Commit 4be630a

Browse files
committed
Fix.
1 parent 78c0d7b commit 4be630a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

mocket/utils.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ def hexload(string: str) -> bytes:
3030
def get_mocketize(wrapper_: Callable) -> Callable:
3131
import decorator
3232

33-
if decorator.__version__ < "5": # type: ignore[attr-defined] # pragma: no cover
34-
return decorator.decorator(wrapper_)
35-
return decorator.decorator( # type: ignore[call-arg] # kwsyntax
36-
wrapper_,
37-
kwsyntax=True,
38-
)
33+
kwargs = {} if decorator.__version__ < "5" else {"kwsyntax": True}
34+
return decorator.decorator(wrapper_, **kwargs)
3935

4036

4137
__all__ = (

0 commit comments

Comments
 (0)