Classes
trace_scope
3
▼
Context manager for indented trace scopes.
Usage:
with trace_scope("parse_list_item", marker="…
trace_scope
3
▼
Context manager for indented trace scopes.
Usage:
with trace_scope("parse_list_item", marker="1."):
# traces within here will be indented
trace("found_content", line="foo")
Methods
Internal Methods 3 ▼
__init__
1
▼
__init__
1
▼
def __init__(self, event: str, **kwargs: Any)
Parameters
| Name | Type | Description |
|---|---|---|
event |
— |
__enter__
0
trace_scope
▼
__enter__
0
trace_scope
▼
def __enter__(self) -> trace_scope
Returns
trace_scope
__exit__
0
▼
__exit__
0
▼
def __exit__(self, *args: Any) -> None
Functions
enable_trace
0
None
▼
Enable list parsing tracing programmatically.
enable_trace
0
None
▼
def enable_trace() -> None
disable_trace
0
None
▼
Disable list parsing tracing.
disable_trace
0
None
▼
def disable_trace() -> None
is_trace_enabled
0
bool
▼
Check if tracing is enabled.
is_trace_enabled
0
bool
▼
def is_trace_enabled() -> bool
Returns
bool
trace
1
None
▼
Log a trace event if tracing is enabled.
trace
1
None
▼
def trace(event: str, **kwargs: Any) -> None
Parameters
| Name | Type | Description |
|---|---|---|
event |
str |
Event name (e.g., "parse_list", "handle_blank_line") **kwargs: Key-value pairs to include in trace output |
trace_decision
3
None
▼
Trace a decision point with its inputs and outcome.
trace_decision
3
None
▼
def trace_decision(event: str, condition: str, result: bool, **context: Any) -> None
Parameters
| Name | Type | Description |
|---|---|---|
event |
str |
Decision event name |
condition |
str |
The condition being evaluated (as string) |
result |
bool |
The boolean result **context: Additional context values |