Skip to content

Commit

Permalink
Issue adamchainz#503 - change rule for useless generator pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
Karine-Bauch committed Jul 27, 2023
1 parent b0f2085 commit b97b726
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/flake8_comprehensions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]:
and isinstance(node.args[0], ast.Call)
and isinstance(node.args[0].func, ast.Name)
and node.args[0].func.id == "sorted"
and isinstance(node.args[0].args[0], ast.GeneratorExp)
):
yield (
node.lineno,
Expand Down

0 comments on commit b97b726

Please sign in to comment.