Dylan
e4c2859c0f
[`flake8-async`] Do not lint yield in context manager `cancel-scope-no-checkpoint` (`ASYNC100`) ( #12896 )
...
For compatibility with upstream, treat `yield` as a checkpoint inside
cancel scopes.
Closes #12873 .
2024-08-15 01:02:57 +00:00
Ran Benita
fbfe2cb2f5
[`flake8-async`] Fix false positives with multiple `async with` items (`ASYNC100`) ( #12643 )
...
## Summary
Please see
https://github.com/astral-sh/ruff/pull/12605#discussion_r1699957443 for
a description of the issue.
They way I fixed it is to get the *last* timeout item in the `with`, and
if it's an `async with` and there are items after it, then don't trigger
the lint.
## Test Plan
Updated the fixture with some more cases.
2024-08-02 21:25:13 +00:00
Charlie Marsh
d774a3bd48
Avoid unused async when context manager includes `TaskGroup` ( #12605 )
...
## Summary
Closes https://github.com/astral-sh/ruff/issues/12354 .
2024-08-01 02:12:43 +00:00
Auguste Lalande
88abc6aed8
[`flake8-async`] Update `ASYNC100` to match upstream ( #12221 )
...
## Summary
Update the name of `ASYNC100` to match
[upstream](https://flake8-async.readthedocs.io/en/latest/rules.html ).
Also update to the functionality to match upstream by supporting
additional context managers from asyncio and anyio. Matching this
[list](https://flake8-async.readthedocs.io/en/latest/glossary.html#timeout-context ).
Part of #12039 .
## Test Plan
Added the new context managers to the fixture.
2024-07-09 17:55:18 +00:00
Auguste Lalande
8cc96d7868
Re-code flake8-trio and flake8-async rules to match upstream ( #10416 )
...
Co-authored-by: Micha Reiser <micha@reiser.io>
2024-06-27 13:44:11 +02:00
Charlie Marsh
5849a75223
Rename `ruff` crate to `ruff_linter` ( #7529 )
2023-09-20 08:38:27 +02:00