Smoke documentation¶
Preamble |
normative sections
|
Contract |
general
|
| «Module» | mymodule |
|---|
Preamble |
normative sections
|
Contract |
general constructor |
| «Class» | A |
|---|
Signature |
mymodule.A.spam(
a: int
b: float
) -> str
|
Preamble |
normative sections
|
Contract |
general |
Parameters |
an integer
a float |
Returns |
The concatentation of the string representations of a and b. |
Raises |
<empty> |
| «Method» | A.spam |
|---|
Preamble |
normative sections
|
Contract |
general constructor |
Derived from |
|
| «Class» | X |
|---|
Error
RuleID: DOC-006
Origin: validation
Summary: Section ‘Returns’ is not allowed for profile ‘inherited_method’.
Found:
Preamble:
normative_sections:
Contract, Returns
Expected:
Preamble:
<one of: { Definitions, Terminology, Contract, Description, Notes, See_also }>
Hint:
waterlint explain-section --label Preamble --profile inherited_method
Preamble |
normative sections
|
Contract |
general
|
Public classes |
Trait, Scope, Flavour, Format, Status, ConfigTraversal, DocSession, tracer, ResolveObjectError, WhitelistReason |
Public functions |
get_source_docstring, is_obj_annotatable, |
Public types |
Supported profile labels for the helper layer. Recursive docstring tree node type. A full docstring tree represented as a list of subtree values. Objects that can be annotated by the helper layer. Rule identifier type alias. Tracer origin labels. Tracer details payload. A set of scope values. Objects that can be traversed by the helper functions. An AST node type relevant for docstring extraction. |
Public constants |
Regular expression for rule IDs. Undocumented: RE_RULE_ID_COMPILED, the precompiled version for performance. Regular expression for identifiers. Undocumented: RE_IDENTIFIER_COMPILED, the precompiled version for performance. Regular expression for qualified identifiers. Undocumented: RE_QUALIFIED_IDENTIFIER_COMPILED, the precompiled version for performance. Regular expression for comma-separated identifiers. Undocumented: RE_CSV_IDENTIFIERS_COMPILED, the precompiled version for performance. Regular expression for Waterloo markup roles in backtick markup. Regular expression for matching Waterloo backtick markup with roles. Undocumented: RE_WTRL_MARKUP_BACKTICK_COMPILED, the precompiled version for performance. Regular expression for matching Waterloo angle bracket HTTPS references. Undocumented: RE_WTRL_ANGLE_HTTPS_REF_COMPILED, the precompiled version for performance. References consist of two parts: clear text and <link>, optionally separated by whitespace. Regular expression for matching Waterloo angle bracket wtrl references. Undocumented: RE_WTRL_ANGLE_WTRL_REF_COMPILED, the precompiled version for performance. References consist of two parts: clear text and <link>, optionally separated by whitespace. Regular expression for matching Waterloo JSON Schema filenames. Undocumented: RE_WTRL_JSON_SCHEMA_NAME_COMPILED, the precompiled version for performance. Whitelist reasons for legacy rule identifiers used by the helper layer. Canonical subsection ordering for section snippets and expected snippets. Canonical profile ordering for CLI help and documentation. Trait tag mapping for trait labels. Scope tag mapping for visibility selection. Flavour tag mapping for normativity keyword rendering. Output format tag mapping for string-related output. Status tag mapping for Preamble.status. Must be a mapping from section and subsection labels to their properties relevant for explanation and validation, for example body category, normativity, and profile applicability. Informative: This is a carefully distilled machine-readable representation of the relevant rules from the documentation standard, but the documentation remains the Single Source of Truth for the standard. |
Public variables |
A cache for storing source docstrings of objects to avoid redundant retrievals. A cache for storing resolved docstring text by object identity. This cache is intentionally public so callers may inspect, clear, or replace it during a process lifetime. |
Definitions |
ABC Definition of ABC for testing markup roles. |
Notes |
Render functions The render functions in this module are intended for building verbose diagnostic messages that include source and expected snippets along with suggestions on how to fix the docstring. Markup roles This section is a test for markup roles.
|
| «Module» | sdv.doc.waterloo.docitem_helper |
|---|
Preamble |
normative sections
|
Terminology |
rules on fail Low-level functions may find a parsing or validation warning or error, but have no clue which rule has been violated. The rules on fail mechanism allows the caller to pass the set of rules in question. The tracer provides a stack and api for these rule sets. |
Contract |
general
constructor
|
Public types |
A list of strings built per context manager during parsing and validation. Entries can be module, class or function names, or labels. |
Public classes |
|
Class overview |
An enum with values DEBUG, INFO, WARNING, ERROR for filtering the output of the tracer. |
Public methods |
|
Method overview |
Build a JSON-serializable |
Notes |
Last review 2026-06-21 Parameter ‘details’ The details payload is important for the MCP server, because it gives the LLM enough debugging context to interpret tracer output and decide how to react to it. It usually is a dict with keys “found”, “expected”, and “hint”; “hint” typically contains a waterlint call for retrieving more information about the affected section or subsection. |
| «Class» | tracer |
|---|
Signature |
sdv.doc.waterloo.docitem_helper.tracer.build_json(
severity: Severity
schema_version: str | None = None
waterloo_version: str | None = None
id_prefix: str | None = None
include_debug: bool = True
) -> dict[str, Any]
|
Preamble |
normative sections
|
Contract |
general
|
Parameters |
Only include entries with this severity level or higher. Levels are ordered as DEBUG < INFO < WARNING < ERROR.
Specify the WTRL Tracer JSON Schema version to declare in the output. Defaults to the current version if not provided. This does not affect the structure of the output, which always follows the current schema. Including the schema version allows consumers to validate against the correct schema and maintain compatibility as the schema evolves.
Optionally include the version of the Waterloo tool that generated the tracer data.
Optionally include a prefix for the `$id` field in the output JSON.
Optionally include debug notes in the output JSON. |
Returns |
A JSON-serializable |
Raises |
<empty> |
| «Method» | tracer.build_json |
|---|