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

Ignore list-copy recommendations for async for loops #11250

Merged
merged 1 commit into from
May 2, 2024

Conversation

charliermarsh
Copy link
Member

Summary

Removes these from PERF402, but adds them to PERF401, with a custom message to use an async comprehension.

Closes #10787.

@zanieb
Copy link
Member

zanieb commented May 2, 2024

Nice!

@charliermarsh charliermarsh merged commit 3a7c01b into main May 2, 2024
19 checks passed
@charliermarsh charliermarsh deleted the charlie/async branch May 2, 2024 18:48
Copy link
Contributor

github-actions bot commented May 2, 2024

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+2 -2 violations, +0 -0 fixes in 1 projects; 43 projects unchanged)

apache/airflow (+2 -2 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --no-preview --select ALL

+ airflow/providers/microsoft/azure/hooks/wasb.py:690:13: PERF401 Use an async list comprehension to create a transformed list
- airflow/providers/microsoft/azure/hooks/wasb.py:690:13: PERF402 Use `list` or `list.copy` to create a copy of a list
+ tests/providers/microsoft/azure/base.py:55:13: PERF401 Use an async list comprehension to create a transformed list
- tests/providers/microsoft/azure/base.py:55:13: PERF402 Use `list` or `list.copy` to create a copy of a list

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
PERF401 2 2 0 0 0
PERF402 2 0 2 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+2 -2 violations, +0 -0 fixes in 1 projects; 43 projects unchanged)

apache/airflow (+2 -2 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview --select ALL

+ airflow/providers/microsoft/azure/hooks/wasb.py:690:13: PERF401 Use an async list comprehension to create a transformed list
- airflow/providers/microsoft/azure/hooks/wasb.py:690:13: PERF402 Use `list` or `list.copy` to create a copy of a list
+ tests/providers/microsoft/azure/base.py:55:13: PERF401 Use an async list comprehension to create a transformed list
- tests/providers/microsoft/azure/base.py:55:13: PERF402 Use `list` or `list.copy` to create a copy of a list

Changes by rule (2 rules affected)

code total + violation - violation + fix - fix
PERF401 2 2 0 0 0
PERF402 2 0 2 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PERF402 triggers, incorrectly, on async for loops
2 participants