File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ async def wrapper(
1616 return await test (* args , ** kwargs )
1717
1818
19- async_mocketize = get_mocketize (wrapper_ = wrapper )
19+ async_mocketize = get_mocketize (wrapper )
2020
2121
2222__all__ = ("async_mocketize" ,)
Original file line number Diff line number Diff line change @@ -92,4 +92,4 @@ def wrapper(
9292 return test (* args , ** kwargs )
9393
9494
95- mocketize = get_mocketize (wrapper_ = wrapper )
95+ mocketize = get_mocketize (wrapper )
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
33import binascii
4+ import contextlib
45from typing import Callable
56
7+ import decorator
8+
69from mocket .compat import decode_from_bytes , encode_to_bytes
710
811
@@ -28,10 +31,9 @@ def hexload(string: str) -> bytes:
2831
2932
3033def get_mocketize (wrapper_ : Callable ) -> Callable :
31- import decorator
32-
33- kwargs = {} if decorator .__version__ < "5" else {"kwsyntax" : True }
34- return decorator .decorator (wrapper_ , ** kwargs )
34+ with contextlib .suppress (TypeError ):
35+ return decorator .decorator (wrapper_ , kwsyntax = True ) # type: ignore[call-arg]
36+ return decorator .decorator (wrapper_ )
3537
3638
3739__all__ = (
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ classifiers = [
2828]
2929dependencies = [
3030 " puremagic" ,
31- " decorator>=4 .0.0" ,
31+ " decorator>=5 .0.0" ,
3232 " urllib3>=1.25.3" ,
3333 " h11" ,
3434 " typing-extensions" ,
You can’t perform that action at this time.
0 commit comments