config ¶
Configuration and exceptions for hot reload system.
Classes:
-
HotReloadConfig–Configuration for the hot reload system.
-
HotReloadError–Base exception for hot reload system errors.
-
DependencyResolutionError–Raised when dependency resolution fails.
-
FileWatchError–Raised when file watching encounters an error.
-
ModuleReloadError–Raised when module reloading fails.
-
ConfigurationError–Raised when configuration is invalid.
Functions:
-
validate_config–Validate hot reload configuration.
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.
Used by:
Methods:
-
__post_init__–Validate configuration after initialization.
Functions¶
__post_init__ ¶
Python
__post_init__() -> None
Validate configuration after initialization.
Raises:
-
ValueError–If any configuration value is invalid.
DependencyResolutionError ¶
Bases: HotReloadError
Raised when dependency resolution fails.
FileWatchError ¶
Bases: HotReloadError
Raised when file watching encounters an error.
ModuleReloadError ¶
Bases: HotReloadError
Raised when module reloading fails.
ConfigurationError ¶
Functions¶
validate_config ¶
Python
validate_config(config: HotReloadConfig) -> None