Skip to content

Conversation

@MeGaGiGaGon
Copy link
Contributor

Summary

Part of #18972

This PR makes blocking-sleep-in-async-function (ASYNC251)'s example error out-of-the-box

Old example

async def fetch():
    time.sleep(1)

New example

import time


async def fetch():
    time.sleep(1)

Imports were also added to the Use instead: section to make it valid code out-of-the-box.

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.

@dylwil3 dylwil3 added the documentation Improvements or additions to documentation label Jun 28, 2025
@dylwil3 dylwil3 merged commit 315adba into astral-sh:main Jun 28, 2025
36 checks passed
@MeGaGiGaGon MeGaGiGaGon deleted the patch-6 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.

2 participants