You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example
pytest decorators are widely used in the testing of Python code. pytest is still untyped for now.
It would be nice to have the possibility to check the typing of own decorators but ignore untyped decorators of some 3rd party libraries.
The text was updated successfully, but these errors were encountered:
@gvanrossum There is an example described here, where it suppresses any error messages generated when the codebase tries importing the module.
I would like to use the same approach to suppress error messages, not about all decorators in my module or my package, but to suppress the error messages for all decorators from 3rd party library, but still detect my own untyped decorators.
fromsome_third_party_packageimportdecorator_one# Untypedfrommy_own_libraryimportdecorator_two# Also untyped# No error here@decorator_onedeffoo() ->None: ...
# But report an error here@decorator_twodefbar() ->None: ...
That's not going to be an easy feature to add; I don't even know where to begin.
Feature
Support
disallow_untyped_decorators
option for 3rd party librariesExample:
Pitch
Example
pytest decorators are widely used in the testing of Python code. pytest is still untyped for now.
It would be nice to have the possibility to check the typing of own decorators but ignore untyped decorators of some 3rd party libraries.
The text was updated successfully, but these errors were encountered: