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
fromtypingimportNamedTupleclassA(NamedTuple):
classB: ... # E: Invalid statement in NamedTuple definition; expected "field_name: field_type [= default]"reveal_type(A.B) # E: "type[A]" has no attribute "B"# N: Revealed type is "Any"
I think that this is a bug that needs to be solved, because we don't have any reason not to allow this (my existing patch shows that semanal and typechecker are happy with allowing these classes).
Activity
tmke8 commentedon Jul 30, 2023
Seems someone tried to fix this before: