kkrunner.TaskFile

class kkrunner.TaskFile(pathname, type=None, info=None, optional=False)[source]

Bases: PathLike

One task file declaration, or its resolved path with retained metadata.

Clients resolve their own templates and callbacks before execution. type and info are opaque client-owned descriptive strings. A pathname may be a template or callback; a callback returning None means the file is not declared for that parameter set. An optional declared file may be absent even after successful execution.

Parameters:
  • pathname (str | PathLike | Callable)

  • type (str | None)

  • info (str | None)

  • optional (bool)

pathname: str | PathLike | Callable
type: str | None = None
info: str | None = None
optional: bool = False