How do I correctly type-annotate the function below?
def f(cls: type) -> ???:
return cls()
# Example usage:
assert f(int) == 0
assert f(list) == []
assert f(tuple) == ()
Is there a way to type-annotate ??? with something that involves the value of cls instead of just Any or to omit the return type annotation? It is OK if I have to change the type annotation of the cls parameter.