Skip to content

Add ASYNC401 for pytest.raises(ExceptionGroup)#466

Open
paranoa233 wants to merge 1 commit into
python-trio:mainfrom
paranoa233:fix-pytest-raises-exceptiongroup-430
Open

Add ASYNC401 for pytest.raises(ExceptionGroup)#466
paranoa233 wants to merge 1 commit into
python-trio:mainfrom
paranoa233:fix-pytest-raises-exceptiongroup-430

Conversation

@paranoa233

Copy link
Copy Markdown

Closes #430.

Summary

  • add opt-in ASYNC401 for pytest.raises(ExceptionGroup/BaseExceptionGroup)
  • detect direct, keyword, tuple, builtins-qualified, backport, and imported pytest.raises forms
  • document the new rule and add changelog coverage

Tests

  • python -m pytest tests/test_flake8_async.py -k ASYNC401
  • python -m pytest tests/test_messages_documented.py
  • python -m pytest tests/test_all_visitors_imported.py
  • python -m pytest --ignore=tests/test_config_and_args.py

@paranoa233 paranoa233 force-pushed the fix-pytest-raises-exceptiongroup-430 branch from 1c23490 to 4e4c1d1 Compare July 8, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lint rule for pytest.raises(ExceptionGroup)

1 participant