Skip to content

Commit 66d3cc0

Browse files
committed
some comment tweaks
1 parent 61d228b commit 66d3cc0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

mypy/suggestions.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,8 @@ def refine_type(ti: Type, si: Type) -> Type:
897897
if isinstance(t, UnionType):
898898
return refine_union(t, s)
899899

900+
# TODO: Refining of builtins.tuple, Type?
901+
900902
return t
901903

902904

@@ -921,8 +923,8 @@ def refine_union(t: UnionType, s: ProperType) -> Type:
921923
if not refined:
922924
new_items.append(lhs)
923925

924-
# We don't ever want to drop None while making these things and
925-
# make_simplified_union calls join which cases
926+
# Turn strict optional on when simplifying the union since we
927+
# don't want to drop Nones.
926928
with strict_optional_set(True):
927929
return make_simplified_union(new_items)
928930

0 commit comments

Comments
 (0)