Almost all instances of pytest.raises(ExceptionGroup) or pytest.raises(BaseExceptionGroup) would be better of rewritten to use pytest.RaisesGroup. It's possible this should be an optional rule as it's fully possible to write perfectly fine code with pytest.raises(ExceptionGroup).