Skip to content

config

Configuration and exceptions for hot reload system.

Classes:

Functions:

Classes

HotReloadConfig dataclass

Python
HotReloadConfig(
    enabled: bool = True,
    watch_directories: list[Path] = (lambda: [Path("src/tux")])(),
    file_patterns: list[str] = (lambda: ["*.py"])(),
    ignore_patterns: list[str] = (lambda: ["__pycache__", "*.pyc", ".git"])(),
    debounce_delay: float = 0.5,
    max_reload_attempts: int = 3,
    reload_timeout: float = RELOAD_TIMEOUT,
    track_dependencies: bool = True,
    max_dependency_depth: int = MAX_DEPENDENCY_DEPTH,
    dependency_cache_size: int = DEPENDENCY_CACHE_SIZE,
    continue_on_error: bool = True,
    log_level: str = "INFO",
    enable_syntax_checking: bool = True,
    enable_performance_monitoring: bool = True,
    enable_class_tracking: bool = True,
)

Configuration for the hot reload system.

Methods:

Functions

__post_init__
Python
__post_init__() -> None

Validate configuration after initialization.

Raises:

  • ValueError

    If any configuration value is invalid.

HotReloadError

Bases: Exception

Base exception for hot reload system errors.

DependencyResolutionError

Bases: HotReloadError

Raised when dependency resolution fails.

FileWatchError

Bases: HotReloadError

Raised when file watching encounters an error.

ConfigurationError

Bases: HotReloadError

Raised when configuration is invalid.

Functions

validate_config

Python
validate_config(config: HotReloadConfig) -> None

Validate hot reload configuration.

Raises: