We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78c0d7b commit 4be630aCopy full SHA for 4be630a
mocket/utils.py
@@ -30,12 +30,8 @@ def hexload(string: str) -> bytes:
30
def get_mocketize(wrapper_: Callable) -> Callable:
31
import decorator
32
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
- )
+ kwargs = {} if decorator.__version__ < "5" else {"kwsyntax": True}
+ return decorator.decorator(wrapper_, **kwargs)
39
40
41
__all__ = (
0 commit comments