This commit is contained in:
2026-03-25 22:39:30 -07:00
parent c31402c8f1
commit 562acd809c
46 changed files with 2367 additions and 1868 deletions

View File

@@ -4,6 +4,7 @@ from dataclasses import dataclass
from pathlib import Path
from typing import Any, Dict, List, Optional, Sequence, Tuple
from SYS.config import get_nested_config_value as _get_nested
from SYS.logger import debug
@@ -28,15 +29,6 @@ def _debug_repr(value: Any, max_chars: int = 12000) -> str:
return _truncate_debug_text(s, max_chars=max_chars)
def _get_nested(config: Dict[str, Any], *path: str) -> Any:
cur: Any = config
for key in path:
if not isinstance(cur, dict):
return None
cur = cur.get(key)
return cur
def _as_bool(value: Any, default: bool = False) -> bool:
if value is None:
return default

View File

@@ -10,6 +10,7 @@ from dataclasses import dataclass
from pathlib import Path
from typing import Any, Dict, Iterator, Optional, Union
from SYS.config import get_nested_config_value as _get_nested
from SYS.logger import debug
from playwright.sync_api import TimeoutError as PlaywrightTimeoutError
@@ -24,15 +25,6 @@ __all__ = [
]
def _get_nested(config: Dict[str, Any], *path: str) -> Any:
cur: Any = config
for key in path:
if not isinstance(cur, dict):
return None
cur = cur.get(key)
return cur
def _resolve_out_dir(arg_outdir: Optional[Union[str, Path]]) -> Path:
"""Resolve an output directory using config when possible."""
if arg_outdir:

View File

@@ -18,6 +18,7 @@ from typing import Any, Dict, Iterator, List, Optional, Sequence, cast
from urllib.parse import urlparse
from SYS import pipeline as pipeline_context
from SYS.config import get_nested_config_value as _get_nested
from SYS.logger import debug, log
from SYS.models import (
DebugLogger,
@@ -137,15 +138,6 @@ def _build_supported_domains() -> set[str]:
return _SUPPORTED_DOMAINS
def _get_nested(config: Dict[str, Any], *path: str) -> Any:
cur: Any = config
for key in path:
if not isinstance(cur, dict):
return None
cur = cur.get(key)
return cur
def _parse_csv_list(value: Any) -> Optional[List[str]]:
if value is None:
return None