-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Replace the module-level __getattr__
with explicit type annotations
#17367
Comments
__getattr__
with explicit type annotation__getattr__
with explicit type annotations
I'd like to tackle it if no problem. |
Sure, feel free to go ahead. |
@BvB93
|
Yes, exactly like that. |
Thank you for your detailed reply. |
ENH: Replace the module-level `__getattr__` with explicit type annotations #17367
The main
__init__.pyi
file currently contains a module-level__getattr__()
function and,while quite convenient due to the incomplete nature of the stubs, its use is rather unsafe:
any
getattr(numpy, str(...))
operation is currently considered valid by static type checkers.For this reason a set of placeholder stubs was recently added to
generic
/ndarray
(#17188) andall public module (#17104). All that remains is to do the same for the main
__init__.pyi
file.TODO
__getattr__()
function from__init__.pyi
.typing.Any
.The text was updated successfully, but these errors were encountered: