-
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
24a3e07
commit aa92c35
Showing
5 changed files
with
43 additions
and
38 deletions.
There are no files selected for viewing
9 changes: 5 additions & 4 deletions
9
crates/ruff_linter/resources/test/fixtures/flake8_trio/TRIO109.py
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,9 +1,10 @@ | ||
|
||
async def foo(): | ||
async def func(): | ||
... | ||
|
||
async def foo(timeout): | ||
|
||
async def func(timeout): | ||
... | ||
|
||
async def foo(timeout=10): | ||
|
||
async def func(timeout=10): | ||
... |
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
22 changes: 9 additions & 13 deletions
22
...les/flake8_trio/snapshots/ruff_linter__rules__flake8_trio__tests__TRIO109_TRIO109.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,22 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_trio/mod.rs | ||
--- | ||
TRIO109.py:5:15: TRIO109 Async function definition with a `timeout` parameter - use `trio.[fail/move_on]_[after/at]` instead | ||
TRIO109.py:5:16: TRIO109 Prefer `trio.fail_after` and `trio.move_on_after` over manual `async` timeout behavior | ||
| | ||
3 | ... | ||
4 | | ||
5 | async def foo(timeout): | ||
| ^^^^^^^ TRIO109 | ||
5 | async def func(timeout): | ||
| ^^^^^^^ TRIO109 | ||
6 | ... | ||
| | ||
|
||
TRIO109.py:8:15: TRIO109 Async function definition with a `timeout` parameter - use `trio.[fail/move_on]_[after/at]` instead | ||
| | ||
6 | ... | ||
7 | | ||
8 | async def foo(timeout=10): | ||
| ^^^^^^^^^^ TRIO109 | ||
9 | ... | ||
| | ||
TRIO109.py:9:16: TRIO109 Prefer `trio.fail_after` and `trio.move_on_after` over manual `async` timeout behavior | ||
| | ||
9 | async def func(timeout=10): | ||
| ^^^^^^^^^^ TRIO109 | ||
10 | ... | ||
| | ||
|
||
|
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