Kleine Anpassungen

This commit is contained in:
2025-07-27 19:41:04 +02:00
parent d91c19fe8c
commit 078f705c5d
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -3,7 +3,8 @@ from pathlib import Path
from sys import platform
from typing import Tuple, Type
from pydantic import Field
from pydantic_yaml import to_yaml_str, parse_yaml_file_as
from pydantic_yaml import to_yaml_str
from ruamel.yaml import YAML
from enum import Enum
import logging
@@ -166,7 +167,7 @@ class AppSettings(BaseSettings):
app_settings = AppSettings()
class Xml(BaseModel):
class XmlFile(BaseModel):
xml: Path
@@ -175,7 +176,7 @@ class XslFile(BaseModel):
bez: str
xsl_file: Path
xslt_params: dict[str, str] = {}
xmls: list[Xml] = []
xmls: list[XmlFile] = []
class TreeNode(BaseModel):
@@ -197,7 +198,6 @@ class PdfProjectSettings(BaseModel):
# Explizit UTF-8 Encoding verwenden
project_yaml_path = project_dir / "project.yaml"
with open(project_yaml_path, 'r', encoding='utf-8') as f:
from ruamel.yaml import YAML
yaml = YAML(typ='safe')
yaml_data = yaml.load(f)
return cls.model_validate(yaml_data)