Skip to content

Commit fcac49f

Browse files
committed
Deprecation handling: remove attempt to handle no-args decorator usage.
1 parent af0d023 commit fcac49f

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pywisetransfer/deprecation.py

-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ def deprecated(message, *args, **kwargs):
1111
https://blog.miguelgrinberg.com/post/the-ultimate-guide-to-python-decorators-part-iii-decorators-with-arguments
1212
"""
1313

14-
# Special-case: a decorator with no arguments is called with a single argument
15-
if not args and not kwargs and callable(message):
16-
warnings.warn(message, DeprecationWarning, stacklevel=2)
17-
return message
18-
1914
# General-case: handle decorators with arguments; @deprecated(message='foo')
2015
def decorator(f):
2116

0 commit comments

Comments
 (0)