Wikin v1.2.5 - Parser (wikin.parser) - Documentation

Wikin v1.2.5
PyPI GitHub

No results found for your search.

# Wikin

Documentation generated by Wikin.

## Module: Parser (wikin.parser)

### Classes

ModuleDoc class

Holds documentation data for a single Python module.

WikinParser class

A parser that scans Python files for docstrings and specially formatted variable comments.

__init__ method
`__init__(self, root_dir)`

Initialize the parser with a root directory or a single file path.

_load_ignore_spec method
`_load_ignore_spec(self)`

Loads ignore patterns from docs/.wikinignore if it exists.

parse method
`parse(self)`

Perform a recursive search for Python files and extract documentation from them.

Returns: List[ModuleDoc]: A list of documented modules found.

_parse_file method
`_parse_file(self, file_path, module_name)`

Parses a single Python file using the ast module.

Args: file_path: Path to the .py file. module_name: Dot-separated module name.

Returns: ModuleDoc containing extracted documentation.

_extract_metadata method
`_extract_metadata(self, docstring, original_name)`

Extracts Wikin-specific metadata from the module docstring.

Args: docstring: The raw module docstring. original_name: The default dot-separated module name.

Returns: tuple: (display_name, cleaned_docstring)

_parse_function method
`_parse_function(self, node)`

Internal helper to create a FunctionDoc from an AST node.