From f0d2f18364af095f61b76895ee88094e9c59dac1 Mon Sep 17 00:00:00 2001 From: venus Date: Mon, 6 Apr 2026 15:19:11 -0500 Subject: [PATCH] config parsing works with persistance --- pyproject.toml | 1 + src/ctf/utils.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1fc1f79..338822a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,4 +18,5 @@ ctf = "ctf.main:main" [tool.hatch.build.targets.wheel] packages = ["src/ctf"] +[tool.pyright] extraPaths = ["src"] diff --git a/src/ctf/utils.py b/src/ctf/utils.py index 0a99c42..3a58eb1 100644 --- a/src/ctf/utils.py +++ b/src/ctf/utils.py @@ -7,12 +7,12 @@ from pathlib import Path from platformdirs import user_config_dir from platformdirs import user_data_dir # Parse config file -# CONFIG_DIR = Path(user_config_dir("ctf")) #config directory is $XDG_CONFIG_HOME/ctf/ -CONFIG_DIR = Path("/home/venus/code/ctf/") -CONFIG_FILE = CONFIG_DIR / "config.toml" def load_config(): + # CONFIG_DIR = Path(user_config_dir("ctf")) #config directory is $XDG_CONFIG_HOME/ctf/ + CONFIG_DIR = Path("/home/venus/code/ctf/") + CONFIG_FILE = CONFIG_DIR / "config.toml" if not CONFIG_FILE.exists(): print("nothing in config, relying on default opts") #this is where to declare default vals if not otherwise specified