validate_actions.cli_components.output_formatter¶
Output formatter interface and implementations for CLI validation results.
Classes
Colored console output formatter. |
|
Interface for formatting CLI output. |
|
Modern Rich-based formatter with clean, minimalist styling. |
- class validate_actions.cli_components.output_formatter.OutputFormatter[source]¶
Bases:
ABCInterface for formatting CLI output.
- abstractmethod format_file_header(file)[source]¶
Format header for a file being validated.
- Parameters:
file (Path)
- Return type:
str
- abstractmethod format_problem(problem)[source]¶
Format a single problem for display.
- Parameters:
problem (Problem)
- Return type:
str
- abstractmethod format_no_problems()[source]¶
Format message when no problems found.
- Return type:
str
- abstractmethod format_summary(total_errors, total_warnings, max_level)[source]¶
Format final summary of all validation results.
- Parameters:
total_errors (int)
total_warnings (int)
max_level (ProblemLevel)
- Return type:
str
- class validate_actions.cli_components.output_formatter.ColoredFormatter[source]¶
Bases:
OutputFormatterColored console output formatter.
Formats CLI output with ANSI color codes and consistent spacing. Used as the default formatter for interactive terminal sessions.
- format_file_header(file)[source]¶
Format file header with underline.
- Parameters:
file (Path)
- Return type:
str
- format_problem(problem)[source]¶
Format problem with colors and positioning.
- Parameters:
problem (Problem)
- Return type:
str
- format_summary(total_errors, total_warnings, max_level)[source]¶
Format colored summary with counts.
- Parameters:
total_errors (int)
total_warnings (int)
max_level (ProblemLevel)
- Return type:
str
- class validate_actions.cli_components.output_formatter.RichFormatter[source]¶
Bases:
OutputFormatterModern Rich-based formatter with clean, minimalist styling.
Features: - Clean typography with subtle colors - Consistent spacing and alignment - Modern icons and visual hierarchy - Responsive layout that works in any terminal width
- format_file_header(file)[source]¶
Format clean file header with modern styling.
- Parameters:
file (Path)
- Return type:
str
- format_problem(problem)[source]¶
Format problem with clean typography and smart alignment.
- Parameters:
problem (Problem)
- Return type:
str
- format_summary(total_errors, total_warnings, max_level)[source]¶
Format modern summary with visual hierarchy.
- Parameters:
total_errors (int)
total_warnings (int)
max_level (ProblemLevel)
- Return type:
str