Skip to content

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

Merged
charliermarsh merged 1 commit intoastral-sh:mainfrom
JonathanPlasse:fix-ruf029-async-comprehension
Apr 21, 2024
Merged

[ruff] fix async comprehension false positive (RUF029)#11070
charliermarsh merged 1 commit intoastral-sh:mainfrom
JonathanPlasse:fix-ruf029-async-comprehension

Conversation

@JonathanPlasse
Copy link
Copy Markdown
Contributor

Summary

Test Plan

Added the false positive code in the test fixture.

@charliermarsh
Copy link
Copy Markdown
Member

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

@charliermarsh charliermarsh added the bug Something isn't working label Apr 21, 2024
@github-actions
Copy link
Copy Markdown
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
@JonathanPlasse JonathanPlasse deleted the fix-ruf029-async-comprehension branch April 21, 2024 12:25
@JonathanPlasse
Copy link
Copy Markdown
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