Skip to content

dbx_patch.models

source module dbx_patch.models

Data models for DBX-Patch results and status.

Provides strongly-typed dataclasses for all function return values.

Classes

source dataclass PthProcessingResult(site_dirs_scanned: int, pth_files_found: int, paths_extracted: list[str], egg_link_paths: list[str], metadata_paths: list[str], paths_added: int, total_editable_paths: int)

Results from processing .pth files.

source dataclass PatchResult(success: bool, already_patched: bool, function_found: bool = True, hook_found: bool = True, editable_paths_count: int = 0, editable_paths: list[str] = field(default_factory=list), error: str | None = None)

Generic patch operation result.

source dataclass ApplyPatchesResult(sys_path_init_patch: PatchResult | None, pth_processing: PthProcessingResult | None, wsfs_hook_patch: PatchResult | None, wsfs_path_finder_patch: PatchResult | None, python_path_hook_patch: PatchResult | None, autoreload_hook_patch: PatchResult | None, overall_success: bool, editable_paths: list[str])

Results from applying all patches.

source dataclass VerifyResult(editable_paths: list[str], paths_in_sys_path: list[str], wsfs_hook_patched: bool, wsfs_path_finder_patched: bool, python_path_hook_patched: bool, autoreload_hook_patched: bool, importable_packages: list[str], status: str)

Results from verifying editable install configuration.

source dataclass StatusResult(sys_path_init_patched: bool, wsfs_hook_patched: bool, wsfs_path_finder_patched: bool, python_path_hook_patched: bool, autoreload_hook_patched: bool, editable_paths_count: int, pth_files_processed: bool)

Current patch status.

source dataclass RemovePatchesResult(sys_path_init_unpatched: bool, wsfs_hook_unpatched: bool, wsfs_path_finder_unpatched: bool, python_path_hook_unpatched: bool, autoreload_hook_unpatched: bool, success: bool)

Results from removing all patches.

source dataclass SitecustomizeStatus(installed: bool, path: str | None, is_dbx_patch: bool)

Status of sitecustomize.py installation.