Refactor HVideoTool's configuration and project management: updated project handling in core/project.py, streamlined restoration settings in config.py, and improved documentation in CLAUDE.md. Removed unused parameters and enhanced type hints for better clarity.

This commit is contained in:
Leonid Pershin
2026-06-07 06:33:00 +03:00
parent 9c471ca701
commit ac02ca27a8
16 changed files with 81 additions and 105 deletions
+2 -3
View File
@@ -41,7 +41,6 @@ _SETTING_KEYS = (
"restorer",
"dm_dir",
"dm_model",
"dm_python",
"dm_gpu",
)
@@ -93,7 +92,7 @@ class Project:
name: str | None = None,
settings: dict | None = None,
source: str | None = None,
) -> "Project":
) -> Project:
"""Create a new project folder (with ``frames/``) and write ``project.json``."""
root = Path(root)
proj = cls(
@@ -108,7 +107,7 @@ class Project:
return proj
@classmethod
def load(cls, path: Path | str) -> "Project":
def load(cls, path: Path | str) -> Project:
"""Load a project from its folder or directly from its ``project.json``."""
path = Path(path)
root = path.parent if path.name == PROJECT_FILE else path