|
|
|
|
|
by mdaniel
1273 days ago
|
|
Type hints can also be strings, which at least PyCharm resolves as if they were real type references from typing import List
class Alpha:
@staticmethod
def doit(b: "Beta") -> List["Beta"]:
return [b]
class Beta:
@staticmethod
def doit(a: "Alpha") -> List["Alpha"]:
return [a]
|
|