python-trio / python-trio/flake8-async

ASYNC102 await-in-finally-or-cancelled false alarms on nurseries

Open
#283 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

rule improvement
Dominant language
Python
Stars
26
Forks
10
PR merge metrics
No merged PRs in 30d

Description

https://github.com/python-trio/flake8-async/blob/225f15a98db4bb8ce4600127fd0fe90bc5c9c04b/tests/eval_files/async102.py#L117-L125

TODO:

  • Special-case async with open_nursery(...), and async with anyio.create_task_group(...) as not being checkpoints. (also affects other rules)
  • handle [nursery_name].cancel_scope.[deadline/shield]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/eval_files/async102.py lines 117-125 and trace the ASYNC102 rule that evaluates them. Check how the nursery and AnyIO task-group cases are classified, then run the relevant tests. Done means these cases no longer produce false alarms, with the related-rule impact from the TODO addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.