config

Configuration management for autoredocs.

📄 /home/runner/work/autoredocs/autoredocs/src/autoredocs/config.py

Classes

class
@dataclass
class AIConfig
Configuration for AI docstring generation.
📍 Line 36

Methods

def
def resolve_api_key(self) -> str
Resolve API key: config value > env var > empty.
class
@dataclass
class AutoredocsConfig
Configuration for an autoredocs run.
📍 Line 51

Methods

def
@classmethod
def load(cls, path: str | Path | None = None) -> AutoredocsConfig
Load config from a YAML file. Falls back to defaults if file missing.
def
def save(self, path: str | Path | None = None) -> Path
Save config to a YAML file.
def
def resolve_source(self, base: Path | None = None) -> Path
Resolve source path relative to a base directory.
def
def resolve_output(self, base: Path | None = None) -> Path
Resolve output path relative to a base directory.