Consider:
from __future__ import annotations class A: @classmethod def get(cls) -> A: return cls() cla