SimpleNamespace and Protocol #9546
Replies: 2 comments
-
No, a If you want to write type-safe code, I recommend avoiding |
Beta Was this translation helpful? Give feedback.
-
For context, the reason mypy accepts this is because |
Beta Was this translation helpful? Give feedback.
-
Consider this sample:
The above passes mypy but pyright does not accept the SimpleNamespace instance.
Is it reasonable to expect pyright to consider them compatible?
Beta Was this translation helpful? Give feedback.
All reactions