Skip to content
Snippets Groups Projects
Commit 208d8a2b authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

add __wrapped__ to wraps

parent 0582e130
No related branches found
No related tags found
No related merge requests found
...@@ -4,3 +4,4 @@ ...@@ -4,3 +4,4 @@
* added `none_if_false` * added `none_if_false`
* fixed import mishap in `satella.coding.transforms` with `hashables_to_int` * fixed import mishap in `satella.coding.transforms` with `hashables_to_int`
* fixed `read_in_file` if file does not exist and default is not set * fixed `read_in_file` if file does not exist and default is not set
* add support for `__wrapped__` in `wraps`
__version__ = '2.14.33a4' __version__ = '2.14.33a5'
...@@ -251,6 +251,10 @@ def wraps(cls_to_wrap: tp.Type) -> tp.Callable[[tp.Type], tp.Type]: ...@@ -251,6 +251,10 @@ def wraps(cls_to_wrap: tp.Type) -> tp.Callable[[tp.Type], tp.Type]:
cls.__signature__ = sig cls.__signature__ = sig
except (TypeError, ValueError, RecursionError, AttributeError): except (TypeError, ValueError, RecursionError, AttributeError):
pass pass
try:
cls.__wrapped__ = cls_to_wrap
except AttributeError:
pass
return cls return cls
return outer return outer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment