Skip to content

Comments

[flake8-async] Make ASYNC210 example error out-of-the-box#18977

Merged
dylwil3 merged 1 commit intoastral-sh:mainfrom
MeGaGiGaGon:patch-2
Jun 28, 2025
Merged

[flake8-async] Make ASYNC210 example error out-of-the-box#18977
dylwil3 merged 1 commit intoastral-sh:mainfrom
MeGaGiGaGon:patch-2

Conversation

@MeGaGiGaGon
Copy link
Contributor

Summary

Part of #18972

This PR makes blocking-http-call-in-async-function (ASYNC210)'s example error out-of-the-box

Old example

async def fetch():
    urllib.request.urlopen("https://example.com/foo/bar").read()

New example

import urllib


async def fetch():
    urllib.request.urlopen("https://example.com/foo/bar").read()

Test Plan

N/A, no functionality/tests affected

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser requested a review from dylwil3 June 27, 2025 17:36
@ntBre ntBre added the documentation Improvements or additions to documentation label Jun 27, 2025
Copy link
Collaborator

@dylwil3 dylwil3 left a comment

Choose a reason for hiding this comment

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

Thanks!

@dylwil3 dylwil3 merged commit ed2e903 into astral-sh:main Jun 28, 2025
36 checks passed
@MeGaGiGaGon MeGaGiGaGon deleted the patch-2 branch June 28, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants