-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[async-function-with-timeout] Disable check for asyncio before Python…
… 3.11 (ASYNC109) (#13023) Co-authored-by: Micha Reiser <micha@reiser.io>
- Loading branch information
1 parent
cfe25ab
commit 1f2cb09
Showing
4 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
.../rules/flake8_async/snapshots/ruff_linter__rules__flake8_async__tests__ASYNC109_0.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs | ||
--- | ||
ASYNC109_0.py:8:16: ASYNC109 Async function definition with a `timeout` parameter | ||
| | ||
8 | async def func(timeout): | ||
| ^^^^^^^ ASYNC109 | ||
9 | ... | ||
| | ||
= help: Use `trio.fail_after` instead | ||
|
||
ASYNC109_0.py:12:16: ASYNC109 Async function definition with a `timeout` parameter | ||
| | ||
12 | async def func(timeout=10): | ||
| ^^^^^^^^^^ ASYNC109 | ||
13 | ... | ||
| | ||
= help: Use `trio.fail_after` instead |
4 changes: 4 additions & 0 deletions
4
.../rules/flake8_async/snapshots/ruff_linter__rules__flake8_async__tests__ASYNC109_1.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs | ||
--- | ||
|