INNER CODE UNIT · Python

Error

koxudaxi/datamodel-code-generator · src/datamodel_code_generator/__init__.py:451

class Error(Exception):
    """Base exception for datamodel-code-generator errors."""

    def __init__(self, message: str) -> None:
        """Initialize with message."""
        self.message: str = message

    def __str__(self) -> str:
        """Return string representation."""
        return self.message


def _normalized_absolute_path(path: Path, *, resolve_aliases: bool = False) -> Path:
    """Return a normalized absolute path, resolving aliases only when needed."""
    expanded_path = path.expanduser()
    if resolve_aliases:
        return expanded_path.resolve(strict=False)
    return Path(os.path.abspath(expanded_path))  # noqa: PTH100

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…