-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Add support for SimpleNamespace #1132
Comments
Hmm I've never used
This means that mypy would basically assume that it can have an arbitrary, unknown set of attributes, due to the The change would have to go to stubs which live in the typeshed repo. Would you mind creating an issue there (https://github.com/python/typeshed/issues)? |
Hi, Thanks.
class SimpleNamespace(Any): ...
|
Closing this, as it's a typeshed issue. |
The following code gives errors:
There are two ways to make this work:
Dict[str, Any]
. Allow all assignments and treat all reads as if they returnAny
.I haven't seen any of mypy's code, but the first sounds simpler. Although there should already be something similar to the second option for module level variables.
The text was updated successfully, but these errors were encountered: