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

[ruff] fix async comprehension false positive (RUF029) #11070

Merged

Conversation

JonathanPlasse
Copy link
Contributor

Summary

Test Plan

Added the false positive code in the test fixture.

@charliermarsh
Copy link
Member

Hey @JonathanPlasse, great to see you on the repo!

@charliermarsh charliermarsh added the bug Something isn't working label Apr 21, 2024
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

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

DisnakeDev/disnake (+0 -1 violations, +0 -0 fixes)

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

- tests/test_utils.py:706:11: RUF029 Function `test_as_chunks` is declared `async`, but doesn't `await` or use `async` features.

RasaHQ/rasa (+0 -4 violations, +0 -0 fixes)

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

- tests/core/evaluation/test_marker_tracker_loader.py:137:11: RUF029 Function `test_warn_count_exceeds_store` is declared `async`, but doesn't `await` or use `async` features.
- tests/core/test_exporter.py:111:11: RUF029 Function `test_fetch_events_within_time_range_tracker_does_not_err` is declared `async`, but doesn't `await` or use `async` features.
- tests/core/test_exporter.py:123:11: RUF029 Function `test_fetch_events_within_time_range_tracker_contains_no_events` is declared `async`, but doesn't `await` or use `async` features.
- tests/core/test_exporter.py:72:11: RUF029 Function `test_fetch_events_within_time_range` is declared `async`, but doesn't `await` or use `async` features.

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
RUF029 5 0 5 0 0

@charliermarsh charliermarsh merged commit a689388 into astral-sh:main Apr 21, 2024
17 checks passed
@JonathanPlasse JonathanPlasse deleted the fix-ruf029-async-comprehension branch April 21, 2024 12:25
@JonathanPlasse
Copy link
Contributor Author

Thanks

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.

RUF029 trigger errors on async interators
2 participants