Summary
The Bar definition here fails at runtime, but we currently don't catch the error:
class Foo:
def __init_subclass__(cls, arg: int): ...
class Bar(Foo): ...
>>> class Bar(Foo): ...
...
Traceback (most recent call last):
File "<python-input-2>", line 1, in <module>
class Bar(Foo): ...
TypeError: Foo.__init_subclass__() missing 1 required positional argument: 'arg'
In order for it to succeed, it would need to be something like
class Foo:
def __init_subclass__(cls, arg: int): ...
class Bar(Foo, arg=42): ...
Version
No response