-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingruleImplementing or modifying a lint ruleImplementing or modifying a lint rule
Description
Let's ruff:
async def foo() -> None:
"""Open something."""
open("foo")Result:
ASYNC101 Async functions should not call `open`, `time.sleep`, or `subprocess` methods
SIM115 Use context handler for opening files
PTH123 `open()` should be replaced by `Path.open()`
Let's apply fix for PTH123 and ruff it again:
async def foo() -> None:
"""Open something."""
path = Path("foo")
path.open("foo")Result: success
Expected:
- ASYNC101 (cause
path.openis also blocking asopenfor async.) - SIM115 (cause
path.openworks the same asopen)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingruleImplementing or modifying a lint ruleImplementing or modifying a lint rule