Skip to content

Commit

Permalink
Microrefactoring: py_version <= 2 should be py_version == 2 (#11986)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jan 14, 2022
1 parent a0234fa commit 17850b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mypy/checkexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,7 @@ def visit_op_expr(self, e: OpExpr) -> Type:
return self.strfrm_checker.check_str_interpolation(e.left, e.right)
if isinstance(e.left, StrExpr):
return self.strfrm_checker.check_str_interpolation(e.left, e.right)
elif pyversion[0] <= 2:
elif pyversion[0] == 2:
if isinstance(e.left, (StrExpr, BytesExpr, UnicodeExpr)):
return self.strfrm_checker.check_str_interpolation(e.left, e.right)
left_type = self.accept(e.left)
Expand Down

0 comments on commit 17850b3

Please sign in to comment.