Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Extend ASYNC401 to other forms

Open
#475 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
tooling

Research direction

Start by locating the ASYNC401 implementation and its tests in the repository. Compare the rule's handling of the listed pytest.raises, pytest.RaisesExc, pytest.RaisesGroup, and pytest.mark.xfail forms, then update coverage so the equivalent ExceptionGroup usages are reported as described.

Written by the indexing model from the issue text.

Description

I was looking at implementing ASYNC401 in Ruff and noticed that there are a couple forms that the rule here doesn't capture but arguably should.

  • pytest.mark.xfail(raises=ExceptionGroup) could be pytest.mark.xfail(raises=pytest.RaisesGroup(...))
  • pytest.RaisesGroup(ExceptionGroup) could be pytest.RaisesGroup(pytest.RaisesGroup(...))
  • pytest.raises(ExceptionGroup[Exception]) and pytest.RaisesExc(ExceptionGroup) are ignored even though they are equivalent to pytest.raises(ExceptionGroup)

Would there be interest in updating the rule to report on the usages above as well?

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

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.

More from python-trio/flake8-async

All issues in python-trio/flake8-async

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.