Skip to content

Commit a41f877

Browse files
committed
Address ASYNC401 review feedback
1 parent 4e4c1d1 commit a41f877

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

docs/changelog.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ Changelog
44

55
`CalVer, YY.month.patch <https://calver.org/>`_
66

7+
27.7.1
8+
======
9+
- Add :ref:`ASYNC401 <async401>` pytest-raises-exception-group, recommending ``pytest.RaisesGroup`` over ``pytest.raises(ExceptionGroup)``. `(issue #430) <https://github.com/python-trio/flake8-async/issues/430>`_
10+
711
26.6.1
812
======
9-
- Add :ref:`ASYNC401 <async401>` pytest-raises-exception-group, an opt-in rule recommending ``pytest.RaisesGroup`` over ``pytest.raises(ExceptionGroup)``. `(issue #430) <https://github.com/python-trio/flake8-async/issues/430>`_
1013
- Add :ref:`ASYNC127 <async127>` unmaintained-httpx: use ``httpx2`` instead of ``httpx``, which is no longer maintained, to get security updates. `(issue #460) <https://github.com/python-trio/flake8-async/issues/460>`_
1114
- :ref:`ASYNC210 <async210>`, :ref:`ASYNC211 <async211>` and :ref:`ASYNC212 <async212>` now also detect blocking calls made through ``httpx2``, and their messages recommend ``httpx2.AsyncClient`` instead of ``httpx.AsyncClient``.
1215

docs/rules.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ _`ASYNC400` : except-star-invalid-attribute
222222

223223
_`ASYNC401` : pytest-raises-exception-group
224224
``pytest.raises(ExceptionGroup)`` and ``pytest.raises(BaseExceptionGroup)`` usually hide the structure of exception groups. Prefer ``pytest.RaisesGroup``.
225-
This rule is disabled by default because some uses of ``pytest.raises`` with exception groups are valid.
226225

227226
Optional rules disabled by default
228227
==================================

flake8_async/visitors/visitor4xx.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from typing import TYPE_CHECKING, Any
1111

1212
from .flake8asyncvisitor import Flake8AsyncVisitor
13-
from .helpers import disabled_by_default, error_class
13+
from .helpers import error_class
1414

1515
if TYPE_CHECKING:
1616
from collections.abc import Mapping
@@ -110,7 +110,6 @@ def visit_FunctionDef(
110110

111111

112112
@error_class
113-
@disabled_by_default
114113
class Visitor401(Flake8AsyncVisitor):
115114
error_codes: Mapping[str, str] = {
116115
"ASYNC401": (

0 commit comments

Comments
 (0)