Let\'s say I have:
class A(object):
pass
class B(A):
pass
I want to declare a function that takes a subclass of A as an argument:
According to the pycharm docs as close as you can get is:
() -> SomeClass
So in your example
def do_something(klass):
"""
:type klass: () -> A
"""
pass
This means (for PyCharm) that the argument you are providing is a function that returns an object of a given type. It will properly type hint anything after the object creation.