Skip to content

Commit 64d16a0

Browse files
committed
WIP: more type hints
1 parent 17e9b99 commit 64d16a0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

challtools/utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ def get_valid_config(workdir: Optional[Union[str, Path]] = None, search: bool =
188188
Raises:
189189
CriticalException: If there are critical validation errors
190190
"""
191-
config = load_config(
192-
search=search, cd=cd, **{"workdir": workdir} if workdir else {}
193-
)
191+
if workdir:
192+
config = load_config(search=search, cd=cd, workdir=workdir)
193+
else:
194+
config = load_config(search=search, cd=cd)
194195

195196
validator = ConfigValidator(config)
196197
messages = validator.validate()[1]
@@ -223,7 +224,7 @@ def get_valid_config(workdir: Optional[Union[str, Path]] = None, search: bool =
223224
return validator.normalized_config
224225

225226

226-
def discover_challenges(search_start: Optional[bool] = None) -> List[Path]:
227+
def discover_challenges(search_start: Optional[str] = None) -> Optional[List[Path]]:
227228
"""Discovers all challenges at the same level as or in a subdirectory below the CTF configuration file.
228229
229230
Returns:

0 commit comments

Comments
 (0)