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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user