Open
Description
from typing import Generic, TypeVar
T = TypeVar("T")
class Foo(Exception, Generic[T]): ...
try:
raise Foo
except Foo[int]: # no error, crashes at runtime
...
this should be a type error because it fails at runtime with the following exception:
TypeError: catching classes that do not inherit from BaseException is not allowed