Classes
_Palette
1
▼
ANSI escape sequences — empty strings when color is disabled.
_Palette
1
▼
ANSI escape sequences — empty strings when color is disabled.
Methods
Internal Methods 1 ▼
__init__
1
▼
__init__
1
▼
def __init__(self, *, enabled: bool) -> None
Parameters
| Name | Type | Description |
|---|---|---|
enabled |
— |
Functions
_use_color
1
bool
▼
True if the output stream supports ANSI color.
_use_color
1
bool
▼
def _use_color(stream: object | None = None) -> bool
Parameters
| Name | Type | Description |
|---|---|---|
stream |
object | None |
Default:None
|
Returns
bool
_severity_icon
2
str
▼
Colored icon for an issue severity.
_severity_icon
2
str
▼
def _severity_icon(severity: Severity, c: _Palette) -> str
Parameters
| Name | Type | Description |
|---|---|---|
severity |
Severity |
|
c |
_Palette |
Returns
str
_format_issue
2
list[str]
▼
Format a single issue as indented lines.
_format_issue
2
list[str]
▼
def _format_issue(issue: ContractIssue, c: _Palette) -> list[str]
Parameters
| Name | Type | Description |
|---|---|---|
issue |
ContractIssue |
|
c |
_Palette |
Returns
list[str]
_concern_for_category
1
str
▼
Return the terminal output group for a contract category.
_concern_for_category
1
str
▼
def _concern_for_category(category: str) -> str
Parameters
| Name | Type | Description |
|---|---|---|
category |
str |
Returns
str
_format_fragment_registry
2
list[str]
▼
Render the fragment target registry grouped by contract.
Returns a list of lin…
_format_fragment_registry
2
list[str]
▼
def _format_fragment_registry(registry: FragmentTargetRegistry, c: _Palette) -> list[str]
Render the fragment target registry grouped by contract.
Returns a list of lines or an empty list when the registry has no registered targets.
Parameters
| Name | Type | Description |
|---|---|---|
registry |
FragmentTargetRegistry |
|
c |
_Palette |
Returns
list[str]
_format_coverage
2
list[str]
▼
Render high-level contract coverage counters.
_format_coverage
2
list[str]
▼
def _format_coverage(result: CheckResult, c: _Palette) -> list[str]
Parameters
| Name | Type | Description |
|---|---|---|
result |
CheckResult |
|
c |
_Palette |
Returns
list[str]
format_check_result
5
str
▼
Format a CheckResult for rich terminal display.
format_check_result
5
str
▼
def format_check_result(result: CheckResult, *, color: bool | None = None, fragment_target_registry: FragmentTargetRegistry | None = None, verbose_registry: bool = False, show_coverage: bool = False) -> str
Parameters
| Name | Type | Description |
|---|---|---|
result |
CheckResult |
The check result to format. |
color |
bool | None |
Force color on/off. None
|
fragment_target_registry |
FragmentTargetRegistry | None |
If provided and non-empty, a summary of registered fragment targets is included — one stats entry for contract count, and (when None
|
verbose_registry |
bool |
When True, render the full registry dump. Gated by the caller on False
|
show_coverage |
bool |
When True, render route/template coverage counters that make form, mounted-page, shell, and OOB contract coverage visible. Default:False
|
Returns
str