I have code like this:
class Direction(Enum):
...
def rotateClockwise(cls, direction):
Is it possible to add a type requirement of the class Direction within the class itself? I ask because when I try using the normal decorator syntax, it says Direction
isn't defined, which makes sense.
I tried this, and would like to be able to do something to the effect of this:
class Direction(Enum):
...
def rotateClockwise(cls, direction: Direction) -> Direction:
So If there is a correct way, what is it?