Skip to content

Commit

Permalink
Merge pull request twisted#1346 from twisted/9902-rodrigc-mypy
Browse files Browse the repository at this point in the history
[mypy] [9902] Fix mypy error in decorator.py

Author: rodrigc
Reviewer: wsanchez
Fixes: ticket:9902
  • Loading branch information
rodrigc committed Jul 16, 2020
2 parents 7adb468 + 3a862c6 commit 9e0adce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/twisted/newsfragments/9902.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion src/twisted/python/deprecate.py
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ def checkDeprecatedParameter(*args, **kwargs):
if name in kwargs:
warn(warningString, DeprecationWarning, stacklevel=2)
return wrappee(*args, **kwargs)
decorated = wraps(wrappee)(checkDeprecatedParameter)
decorated = typing.cast(_Tc, wraps(wrappee)(checkDeprecatedParameter))
_appendToDocstring(decorated, doc)
return decorated
return wrapper

0 comments on commit 9e0adce

Please sign in to comment.