You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support overloading attribute access by defining a __getattr__ method. If a class has a __getattr__ method, mypy should let programs access any attributes, and the type would be the return type of __getattr__. Example:
classA:
def__getattr__(self, name: str) ->int: return2a=A()
print(a.foobar) # okay, type is int
Activity
tommyjcarpenter commentedon Dec 24, 2021
I hit a similar issue today; I have found I need to change my code from:
to