Skip to content

Commit 63c1080

Browse files
committed
Rebase and update comment
1 parent 2451c0c commit 63c1080

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mypy/semanal_typeddict.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,12 @@ def analyze_typeddict_classdef_fields(
298298
# NamedTupleAnalyzer doesn't and instead has semanal.py set it
299299
# by calling analyze_class_body_common after.
300300
#
301-
# TODO: Resolve this inconsistency?
301+
# This is because unlike TypedDicts, NamedTuples support method
302+
# definitions. So, we must handle some of what analyze_class_body_common
303+
# does here -- including modifying `stmt.type`.
304+
#
305+
# TODO: Find some way of refactoring and partially unifying
306+
# these two codepaths?
302307
stmt.type = analyzed
303308
types.append(analyzed)
304309
# ...despite possible minor failures that allow further analyzis.

0 commit comments

Comments
 (0)