Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flake8-comprehensions] Skip iterables with named expressions in unnecessary-map (C417) #14827

Merged
merged 5 commits into from
Dec 7, 2024

Conversation

dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Dec 6, 2024

This PR modifies unnecessary-map (C417) to skip map expressions if the iterable contains a named expression, since those cannot appear in comprehensions.

Closes #14808

Copy link
Contributor

github-actions bot commented Dec 6, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh added the bug Something isn't working label Dec 7, 2024
@charliermarsh charliermarsh changed the title [flake8-comprehensions] Skip iterables with named expressions in unnecessary-map (C417)` [flake8-comprehensions] Skip iterables with named expressions in unnecessary-map (C417) Dec 7, 2024
@charliermarsh charliermarsh changed the title [flake8-comprehensions] Skip iterables with named expressions in unnecessary-map (C417) [flake8-comprehensions] Skip iterables with named expressions in unnecessary-map (C417) Dec 7, 2024
@charliermarsh charliermarsh merged commit 2c13e65 into astral-sh:main Dec 7, 2024
21 checks passed
@dylwil3 dylwil3 deleted the walrus-compr branch December 7, 2024 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix error] C417 and walrus statements
2 participants