def _repr_expected(e: type[BaseException] | AbstractRaises[BaseException]) -> str:
        """Get the repr of an expected type/RaisesExc/RaisesGroup, but we only want
        the name if it's a type"""
        if isinstance(e, type):
            return _exception_type_name(e)
        return repr(e)
Get the repr of an expected type/RaisesExc/RaisesGroup, but we only want
        the name if it's a type
src/_pytest/raises.py