Similar but different to How do I type hint a method with the type of the enclosing class?.
How can I set something on the parent class so that a type hint gets updated through inheritance?
class A:
# Make some change here
def foo(self, bar: 'A'):
pass
class B(A):
# Get the hinting of the code below, but without writing it for every inheritor.
# def foo(self, bar: 'B'):
# pass
pass