You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
Activity
jakkdl commentedon Sep 22, 2026
Yeah, I think all these should be covered. I don't think there was any conscious decision from @paranoa233 in #466 to skip them.
Feel free to flag them in Ruff straight away