Skip to content

[flake8-async] Implement blocking-input rule (ASYNC250)#20122

Merged
amyreese merged 2 commits intoastral-sh:mainfrom
amyreese:async-rules
Aug 28, 2025
Merged

[flake8-async] Implement blocking-input rule (ASYNC250)#20122
amyreese merged 2 commits intoastral-sh:mainfrom
amyreese:async-rules

Conversation

@amyreese
Copy link
Copy Markdown
Member

Summary

Adds new rule to catch use of builtins input() in async functions.

Issue #8451

Test Plan

New snapshosts in ASYNC250.py with cargo insta test.

@amyreese amyreese requested a review from ntBre August 28, 2025 00:23
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 28, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre added rule Implementing or modifying a lint rule preview Related to preview mode features labels Aug 28, 2025
Copy link
Copy Markdown
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks! Just a couple of minor things

@amyreese
Copy link
Copy Markdown
Member Author

@ntBre fixed the oversights and updated to use match_builtin_expr

Copy link
Copy Markdown
Contributor

@ntBre ntBre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@amyreese amyreese merged commit ca1f66a into astral-sh:main Aug 28, 2025
35 checks passed
second-ed pushed a commit to second-ed/ruff that referenced this pull request Sep 9, 2025
…-sh#20122)

## Summary

Adds new rule to catch use of builtins `input()` in async functions.

Issue astral-sh#8451

## Test Plan

New snapshosts in `ASYNC250.py` with `cargo insta test`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Related to preview mode features rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants