Skip to content

Commit

Permalink
Fix unnecessary list comprehension
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordandev678 committed Sep 18, 2024
1 parent e4e6dc5 commit d72f74b
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 @@ -570,7 +570,7 @@ def visit_call_expr_inner(self, e: CallExpr, allow_none_return: bool = False) ->
if (
typ is not None
and isinstance(typ, UnionType)
and all([isinstance(t, LiteralType) for t in typ.items])
and all(isinstance(t, LiteralType) for t in typ.items)
):
# Returning strings is defined but order isn't so
# we need to return type * len of the union
Expand Down

0 comments on commit d72f74b

Please sign in to comment.