-
-
Notifications
You must be signed in to change notification settings - Fork 0
Debugging and Best Practices
Phorb edited this page Aug 5, 2025
·
1 revision
Importing from eggsplode.core in the card modules will cause cyclic imports issues. If you need to import the Game class for type checking, use conditioned import:
from eggsplode.core import Game
def func(game: Game):
...from typing import TYPE_CHECKING
if TYPE_CHECKING:
from eggsplode.core import Game
# Don't forget the double quotes around "Game"!
def func(game: "Game"):
...