Currently attributes can be defined by assigning via self in the __init__ method. This should be extended to all methods, in order to improve compatibility with Python:
class A:
def __init__(self) -> None:
self.x = 1 # Ok, define x
def foo(self) -> None:
self.y = 'a' # Ok, define y