mirror of
https://github.com/GoodStartLabs/AI_Diplomacy.git
synced 2026-04-19 12:58:09 +00:00
resolving issues raised in pr
This commit is contained in:
parent
ad817695ef
commit
73a3c0596a
7 changed files with 50 additions and 41 deletions
|
|
@ -29,7 +29,18 @@ from collections import defaultdict, Counter
|
|||
import re
|
||||
from typing import Dict, List, Tuple, Optional, Any
|
||||
import statistics
|
||||
from ..models import PowerEnum
|
||||
try:
|
||||
# Absolute import – works when the project root is on sys.path
|
||||
from models import PowerEnum
|
||||
except ImportError:
|
||||
try:
|
||||
# Relative import – works when file is executed as part of the ai_diplomacy package
|
||||
from ..models import PowerEnum
|
||||
except ImportError as exc:
|
||||
# Re-raise with context so the root cause is visible
|
||||
raise ImportError(
|
||||
"models.PowerEnum not found via absolute or relative import. "
|
||||
) from exc
|
||||
|
||||
class StatisticalGameAnalyzer:
|
||||
"""Production-ready analyzer for AI Diplomacy game statistics.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue