Skip to content

Commit

Permalink
Rebase and update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael0x2a committed Oct 23, 2022
1 parent ef4d492 commit 1f9a1c0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mypy/semanal_typeddict.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1f9a1c0

Please sign in to comment.