Skip to content

Commit 6ad3ea1

Browse files
authored
Refactor push type map (#10175)
push_type_map was re-implemented in-place for check_for_comp
1 parent bfc67b6 commit 6ad3ea1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mypy/checkexpr.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3801,8 +3801,7 @@ def check_for_comp(self, e: Union[GeneratorExpr, DictionaryComprehension]) -> No
38013801
true_map, false_map = self.chk.find_isinstance_check(condition)
38023802

38033803
if true_map:
3804-
for var, type in true_map.items():
3805-
self.chk.binder.put(var, type)
3804+
self.chk.push_type_map(true_map)
38063805

38073806
if codes.REDUNDANT_EXPR in self.chk.options.enabled_error_codes:
38083807
if true_map is None:

0 commit comments

Comments
 (0)