Skip to content

[flake8-async] Fix in_async_context logic#23426

Merged
dylwil3 merged 2 commits intoastral-sh:mainfrom
dylwil3:async-context
Feb 19, 2026
Merged

[flake8-async] Fix in_async_context logic#23426
dylwil3 merged 2 commits intoastral-sh:mainfrom
dylwil3:async-context

Conversation

@dylwil3
Copy link
Collaborator

@dylwil3 dylwil3 commented Feb 19, 2026

We move the logic from Checker::in_async_context (from when it implements SemanticSyntaxContext) into the similarly named method in SemanticModel. This affects the following rules:

  • ASYNC105
  • ASYNC210
  • ASYNC212
  • ASYNC220
  • ASYNC221
  • ASYNC222
  • ASYNC230
  • ASYNC240
  • ASYNC250
  • ASYNC251
  • UP028

Closes #23425

@dylwil3 dylwil3 added bug Something isn't working rule Implementing or modifying a lint rule labels Feb 19, 2026
@dylwil3 dylwil3 changed the title Fix in_async_context logic [flake8-async] Fix in_async_context logic Feb 19, 2026
@dylwil3 dylwil3 marked this pull request as ready for review February 19, 2026 18:57
@astral-sh-bot
Copy link

astral-sh-bot bot commented Feb 19, 2026

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@dylwil3 dylwil3 merged commit 1465b5d into astral-sh:main Feb 19, 2026
44 checks passed
@dylwil3 dylwil3 deleted the async-context branch February 19, 2026 19:08
knutwannheden pushed a commit to openrewrite/ruff that referenced this pull request Feb 20, 2026
We move the logic from `Checker::in_async_context` (from when it
implements `SemanticSyntaxContext`) into the similarly named method in
`SemanticModel`. This affects the following rules:

- ASYNC105
- ASYNC210
- ASYNC212
- ASYNC220 
- ASYNC221 
- ASYNC222
- ASYNC230
- ASYNC240
- ASYNC250
- ASYNC251
- UP028

Closes astral-sh#23425
@ntBre ntBre mentioned this pull request Mar 2, 2026
38 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ASYNC250 false positive for input call wrapped into lambda

2 participants