This commit is contained in:
Auric Vente
2024-07-25 05:41:47 -06:00
parent 522297aa33
commit c97c6d0a70
6 changed files with 213 additions and 4 deletions

View File

@@ -8,6 +8,7 @@ from .config import Config
if TYPE_CHECKING:
from .ants import Ant
from .args import Args
from .utils import Utils
@@ -30,7 +31,13 @@ class Storage:
@staticmethod
def get_names() -> Any:
with Config.names_json.open() as file:
path = Config.names_json
if Args.names:
if Args.names.exists():
path = Args.names
with path.open() as file:
return json.load(file)
@staticmethod