This is my code:
class MyClass:
def __init__(self, a: str, b: int):
self.a: str = a
self.b: int = b
hints = get_type_hints(MyClass())
print(hints)
I want to do something like this:
get_type_hints(MyClass)
and get this output:
{"a": str, "b": int}
I tried using type()
but didn't get an optimal solution!