Replies: 1 comment 5 replies
-
This is intentional. The If you want to define a TypedDict where item class D(TypedDict):
x: NotRequired[int] |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can see a few things around
isinstance
changed in v1.1.380, but not quite sure if what's described below is intended behavior or a bug.In the code below
isinstance
is effectively being used to cast a specificTypedDict
type toMutableMapping
, which worked prior to v1.1.380, at which point it's being reported as an error. Is this intentional, and if it is, is it becauseMutableMapping
is not inTypedDict
's bases? In the latter case, a warning would be useful that this narrowing attempt is a no-op.Thanks
Beta Was this translation helpful? Give feedback.
All reactions