Files
imagepipeline/imagepipeline/core/step.py
T
Frank Schwenk a60a18a253 chore: add Ruff and apply formatting across codebase
Introduce ruff lint/format config, expand .gitignore, and reformat Python sources.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 17:34:14 +02:00

48 lines
985 B
Python

from __future__ import annotations
from dataclasses import dataclass, field
from pathlib import Path
from typing import TYPE_CHECKING, Any
if TYPE_CHECKING:
from imagepipeline.modules.base import BaseModule
INPUT_SOURCE = "input"
@dataclass
class StepDefinition:
"""Internal step registered on a pipeline."""
step_id: str
module_name: str
module: BaseModule
input_refs: list[str]
params: dict[str, Any]
output_dir_name: str
@dataclass
class StepRef:
"""Reference to a pipeline step, returned by Pipeline.step()."""
step_id: str
output_dir_name: str
def __repr__(self) -> str:
return f"StepRef({self.output_dir_name!r})"
@dataclass
class StepResult:
"""Result of an executed step."""
step_id: str
output_dir_name: str
module_name: str
output_dir: Path
input_paths: list[Path]
output_paths: list[Path] = field(default_factory=list)
params: dict[str, Any] = field(default_factory=dict)