INNER CODE UNIT · Python

__str__

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

    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


def _validate_generation_path_conflicts(  # noqa: PLR0912
    input_: _GenerationInput,
    output: Path | None,
    model_metadata: Path | None,
    lockfile: Path | None = None,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…