Skip to content

Commit 63fe0af

Browse files
committed
tweak
1 parent 1f4b29c commit 63fe0af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mypy/binder.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ def assign_type(self, expr: Expression,
267267
return
268268

269269
enclosing_type = self.most_recent_enclosing_type(expr, type)
270-
if (isinstance(enclosing_type, AnyType)
271-
and not restrict_any):
270+
if (isinstance(enclosing_type, AnyType) and not restrict_any):
272271
# If x is Any and y is int, after x = y we do not infer that x is int.
273272
# This could be changed.
274273
# Instead, since we narrowed type from Any in a recent frame (probably an

0 commit comments

Comments
 (0)