fix: resolve CI linting and type checking issues
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-02-04 22:07:53 +00:00
parent 51dbe8c277
commit 7c56701331

View File

@@ -1,7 +1,7 @@
"""YAML format converter."""
from pathlib import Path
from typing import Any, Dict
from typing import Any, Dict, Union
import yaml
@@ -14,7 +14,7 @@ class YamlConverter(BaseConverter):
FORMAT_NAME = "yaml"
FILE_EXTENSIONS = ["yaml", "yml"]
def read(self, source: str | Path) -> Dict[str, Any]:
def read(self, source: Union[str, Path]) -> Dict[str, Any]:
"""Read and parse a YAML configuration file."""
try:
with open(source, "r", encoding="utf-8") as f:
@@ -26,7 +26,7 @@ class YamlConverter(BaseConverter):
except PermissionError as e:
raise ConversionError(f"Permission denied: {source}") from e
def write(self, data: Dict[str, Any], target: str | Path) -> None:
def write(self, data: Dict[str, Any], target: Union[str, Path]) -> None:
"""Write configuration data to a YAML file."""
try:
with open(target, "w", encoding="utf-8") as f: