Skip to content

FormatAndLintResult

🛈 DocStrings

Combined result of format and lint operations.

Source code in src/anyenv/language_formatters/_base.py
@dataclass
class FormatAndLintResult:
    """Combined result of format and lint operations."""

    format_result: FormatResult
    lint_result: LintResult

    @property
    def success(self) -> bool:
        """Overall success if both operations succeeded."""
        return self.format_result.success and self.lint_result.success

    @property
    def total_duration(self) -> float:
        """Total duration of both operations."""
        return self.format_result.duration + self.lint_result.duration

success property

success: bool

Overall success if both operations succeeded.

total_duration property

total_duration: float

Total duration of both operations.

:fa-brands-github: Show source on GitHub