Skip to content

Commit

Permalink
Extend 107 and 108 to handle async iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl committed Aug 3, 2022
1 parent b53e5fa commit bf98409
Show file tree
Hide file tree
Showing 10 changed files with 1,091 additions and 149 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
*[CalVer, YY.month.patch](https://calver.org/)*

## Future
- Extend TRIO107 and 108 to also handle yields

## 22.7.6
- Extend TRIO102 to also check inside `except BaseException` and `except trio.Cancelled`
- Extend TRIO104 to also check for `yield`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ pip install flake8-trio
- **TRIO105**: Calling a trio async function without immediately `await`ing it.
- **TRIO106**: trio must be imported with `import trio` for the linter to work.
- **TRIO107**: Async functions must have at least one checkpoint on every code path, unless an exception is raised.
- **TRIO108**: Early return from async function must have at least one checkpoint on every code path before it, unless an exception is raised.
Checkpoints are `await`, `async with` `async for`.
- **TRIO108**: `return` or `yield` from async function must have at least one checkpoint on every code path before it, unless an exception is raised.
Checkpoints are `await`, `async for`, and `async with` (on one of enter/exit).
Loading

0 comments on commit bf98409

Please sign in to comment.