cleaning things up by refactoring and combining files

This commit is contained in:
venus
2026-07-19 01:31:09 -05:00
parent 7f00bdb385
commit 185482f3d5
14 changed files with 335 additions and 154 deletions

View File

@@ -37,7 +37,8 @@ def set_flag_format(pattern: str, original: str):
You can either specify the regex PATTERN directly, or provide an example flag
via the -o/--original option to generate and select from a list of suggested patterns.
"""
from ctf.utils import load_config, write_config, suggest_patterns
from ctf.config import load_config, write_config
from ctf.utils import suggest_patterns
if pattern is None and original is None:
raise click.UsageError("Either PATTERN positional argument or --original/-o option must be specified.")
@@ -77,7 +78,7 @@ def set_flag_format(pattern: str, original: str):
@click.argument("name")
def set_competition(name: str):
"""Set the name of the active competition."""
from ctf.utils import load_config, write_config
from ctf.config import load_config, write_config
config_path = "/home/venus/code/ctf/config.toml"
config = load_config(config_path)