Skip to content

Class peagen.errors.ProjectsPayloadFormatError

peagen.errors.ProjectsPayloadFormatError

ProjectsPayloadFormatError(found_type, path=None)

Bases: ValueError

Raised when a projects_payload is not a YAML mapping.

Source code in peagen/errors.py
236
237
238
239
240
241
def __init__(self, found_type: str, path: str | None = None) -> None:
    self.found_type = found_type
    self.path = path
    loc = f" in {path}" if path else ""
    msg = f"projects_payload{loc} must be a YAML mapping, got {found_type}"
    super().__init__(msg)

found_type instance-attribute

found_type = found_type

path instance-attribute

path = path