diff --git a/mypy/semanal_typeddict.py b/mypy/semanal_typeddict.py index 0c161c9f183d..696ce2da4894 100644 --- a/mypy/semanal_typeddict.py +++ b/mypy/semanal_typeddict.py @@ -298,7 +298,12 @@ def analyze_typeddict_classdef_fields( # NamedTupleAnalyzer doesn't and instead has semanal.py set it # by calling analyze_class_body_common after. # - # TODO: Resolve this inconsistency? + # This is because unlike TypedDicts, NamedTuples support method + # definitions. So, we must handle some of what analyze_class_body_common + # does here -- including modifying `stmt.type`. + # + # TODO: Find some way of refactoring and partially unifying + # these two codepaths? stmt.type = analyzed types.append(analyzed) # ...despite possible minor failures that allow further analyzis.