-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
696f81e
commit 27f7715
Showing
5 changed files
with
29 additions
and
16 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
6 changes: 4 additions & 2 deletions
6
...ake8_async/snapshots/ruff_linter__rules__flake8_async__tests__ASYNC109_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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs | ||
--- | ||
ASYNC109_0.py:8:16: ASYNC109 Prefer using an async timeout context manager such as `trio.fail_after` over reimplementing the functionality | ||
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 Prefer using an async timeout context manager such as `trio.fail_after` over reimplementing the functionality | ||
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 |
6 changes: 4 additions & 2 deletions
6
...c/snapshots/ruff_linter__rules__flake8_async__tests__preview__ASYNC109_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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs | ||
--- | ||
ASYNC109_0.py:8:16: ASYNC109 Prefer using an async timeout context manager such as `trio.fail_after` over reimplementing the functionality | ||
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 Prefer using an async timeout context manager such as `trio.fail_after` over reimplementing the functionality | ||
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 |
6 changes: 4 additions & 2 deletions
6
...c/snapshots/ruff_linter__rules__flake8_async__tests__preview__ASYNC109_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 |
---|---|---|
@@ -1,16 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_async/mod.rs | ||
--- | ||
ASYNC109_1.py:5:16: ASYNC109 Prefer using an async timeout context manager such as `asyncio.timeout` over reimplementing the functionality | ||
ASYNC109_1.py:5:16: ASYNC109 Async function definition with a `timeout` parameter | ||
| | ||
5 | async def func(timeout): | ||
| ^^^^^^^ ASYNC109 | ||
6 | ... | ||
| | ||
= help: Use `asyncio.timeout` instead | ||
|
||
ASYNC109_1.py:9:16: ASYNC109 Prefer using an async timeout context manager such as `asyncio.timeout` over reimplementing the functionality | ||
ASYNC109_1.py:9:16: ASYNC109 Async function definition with a `timeout` parameter | ||
| | ||
9 | async def func(timeout=10): | ||
| ^^^^^^^^^^ ASYNC109 | ||
10 | ... | ||
| | ||
= help: Use `asyncio.timeout` instead |