python-trio / python-trio/flake8-async

support human-friendly names in `--disable`, `noqa` and `--enable`

Open
#236 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Ruff might be adding support for human-friendly names for rules https://github.com/astral-sh/ruff/issues/1773

So at some point somebody probably needs to come up with names for our rules as they're implemented in Ruff anyway, in which case we might as well do it ourselves*. The easiest place to support this would be in --disable and --enable. We don't currently parse # noqa, see https://github.com/python-trio/flake8-async/issues/185, but this adds another reason to handle noqa-parsing on our own.
But the main upside is probably in daily speech and discussion, throwing around ASYNC102 or ASYNC119 ~always requires looking up the codes even for me.

* Claude did decent but not great when asked for suggestions:

ASYNC100:
- timeout-no-await
- idle-timeout
- checkpoint-missing
- await-required

ASYNC101:
- unsafe-nursery-yield
- yield-breaks-nursery
- yield-context-only
- invalid-yield

ASYNC102:
- unshielded-await
- await-needs-shield
- unsafe-finally-await
- unprotected-await

ASYNC103:
- unhandled-cancellation
- cancellation-not-reraised
- missing-cancel-handler
- reraise-required

ASYNC104:
- unreraised-cancellation
- must-reraise-cancel
- cancellation-not-propagated
- incomplete-cancellation

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 by reading Ruff issue 1773 and flake8-async issue 185, then inspect how --disable and --enable are currently handled. Done requires agreed human-friendly names for the rules and support for those names in the options and in noqa parsing.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.