about summary refs log tree commit diff stats
path: root/fungus/game_model.py
diff options
context:
space:
mode:
Diffstat (limited to 'fungus/game_model.py')
-rw-r--r--fungus/game_model.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/fungus/game_model.py b/fungus/game_model.py
index 3930811..2f114bc 100644
--- a/fungus/game_model.py
+++ b/fungus/game_model.py
@@ -5,8 +5,6 @@ import json
 import os
 import tempfile
 from dataclasses import dataclass, field
-from typing import TYPE_CHECKING
-
 # ── Game data model ─────────────────────────────────────────────────────
 
 
@@ -192,17 +190,12 @@ class GameLibrary:
         Returns a list of ``Game`` objects.  If the same ``gameid`` appears
         in multiple files, the first occurrence wins and a warning is logged.
         """
-        if TYPE_CHECKING:
+        try:
             from fungus.logger import get_logger
 
             log = get_logger(__name__)
-        else:
-            try:
-                from fungus.logger import get_logger
-
-                log = get_logger(__name__)
-            except ImportError:
-                log = None  # type: ignore[assignment]
+        except ImportError:
+            log = None  # type: ignore[assignment]
 
         games: list[Game] = []
         seen: dict[str, str] = {}  # gameid -> filename