You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+5-4
Original file line number
Diff line number
Diff line change
@@ -32,8 +32,6 @@ pip install flake8-trio
32
32
-**TRIO104**: `Cancelled` and `BaseException` must be re-raised - when a user tries to `return` or `raise` a different exception.
33
33
-**TRIO105**: Calling a trio async function without immediately `await`ing it.
34
34
-**TRIO106**: `trio` must be imported with `import trio` for the linter to work.
35
-
-**TRIO107**: Renamed to TRIO910
36
-
-**TRIO108**: Renamed to TRIO911
37
35
-**TRIO109**: Async function definition with a `timeout` parameter - use `trio.[fail/move_on]_[after/at]` instead
38
36
-**TRIO110**: `while <condition>: await trio.sleep()` should be replaced by a `trio.Event`.
39
37
-**TRIO111**: Variable, from context manager opened inside nursery, passed to `start[_soon]` might be invalidly accessed while in use, due to context manager closing before the nursery. This is usually a bug, and nurseries should generally be the inner-most context manager.
@@ -42,7 +40,6 @@ pip install flake8-trio
42
40
-**TRIO114**: Startable function (i.e. has a `task_status` keyword parameter) not in `--startable-in-context-manager` parameter list, please add it so TRIO113 can catch errors when using it.
43
41
-**TRIO115**: Replace `trio.sleep(0)` with the more suggestive `trio.lowlevel.checkpoint()`.
44
42
-**TRIO116**: `trio.sleep()` with >24 hour interval should usually be `trio.sleep_forever()`.
45
-
-**TRIO117**: Don't raise or catch `trio.[NonBase]MultiError`, prefer `[exceptiongroup.]BaseExceptionGroup`. Even if Trio still raises `MultiError` for legacy code, it can be caught with `BaseExceptionGroup` so it's fully redundant.
46
43
-**TRIO118**: Don't assign the value of `anyio.get_cancelled_exc_class()` to a variable, since that breaks linter checks and multi-backend programs.
47
44
48
45
### Warnings for blocking sync calls in async functions
@@ -58,13 +55,17 @@ pip install flake8-trio
58
55
-**TRIO232**: Blocking sync call on file object, wrap the file object in `trio.wrap_file()` to get an async file object.
59
56
-**TRIO240**: Avoid using `os.path` in async functions, prefer using `trio.Path` objects.
60
57
61
-
62
58
### Warnings disabled by default
63
59
-**TRIO900**: Async generator without `@asynccontextmanager` not allowed.
64
60
-**TRIO910**: Exit or `return` from async function with no guaranteed checkpoint or exception since function definition.
65
61
-**TRIO911**: Exit, `yield` or `return` from async iterable with no guaranteed checkpoint since possible function entry (yield or function definition)
66
62
Checkpoints are `await`, `async for`, and `async with` (on one of enter/exit).
67
63
64
+
### Removed Warnings
65
+
-**TRIO107**: Renamed to TRIO910
66
+
-**TRIO108**: Renamed to TRIO911
67
+
-**TRIO117**: Don't raise or catch `trio.[NonBase]MultiError`, prefer `[exceptiongroup.]BaseExceptionGroup`. `MultiError` was removed in trio==0.24.0.
0 commit comments