Code sample in pyright playground
class Meta(type):
pass
class A(metaclass=Meta): # Remove metaclass to observe the correct behavior
pass
def func(a: A):
# The goto definition also goes to type.__dict__, not object.__dict__
reveal_type(a.__dict__) # MappingProxyType[str, Any] with metaclass, dict[str, Any] without
Code sample in pyright playground