window.WIKIN_MODULE_wikin_parser = {"name": "Parser (wikin.parser)", "original_name": "wikin.parser", "path": "D:\\Все\\Wikin\\wikin\\parser.py", "docstring": "", "functions": [], "variables": [], "classes": [{"name": "ModuleDoc", "docstring": "Holds documentation data for a single Python module.", "methods": []}, {"name": "WikinParser", "docstring": "A parser that scans Python files for docstrings and specially formatted variable comments.\n\nThis parser utilizes the built-in `ast` module to traverse Python files and extract classes,\nfunctions, methods, along with their docstrings and signatures.\n\n#### Attributes\n\n| Name | Type | Description |\n|---|---|---|\n| root_dir | str | The root directory to scan for Python files. |\n| modules | list | A list of parsed module documentation objects. |\n| ignore_spec | PathSpec | A PathSpec object used to filter out ignored files based on `.wikinignore`. |", "methods": [{"name": "__init__", "signature": "__init__(self, root_dir: str)", "docstring": "Initialize the parser with a root directory or a single file path.\n\n#### Args\n\n| Name | Type | Description |\n|---|---|---|\n| root_dir | str | The target root directory path or file path from which to extract docs. |"}, {"name": "_load_ignore_spec", "signature": "_load_ignore_spec(self)", "docstring": "Loads ignore patterns from docs/.wikinignore if it exists.\n\n#### Returns\n\n| Type | Description |\n|---|---|\n| Optional[pathspec.PathSpec] | A configured PathSpec if the ignore file is found, otherwise None. |"}, {"name": "parse", "signature": "parse(self)", "docstring": "Perform a recursive search for Python files and extract documentation from them.\n\nThis method walks through the root directory, identifies all valid Python files \n(excluding those in junk directories or matched by the ignore spec), and parses \nthem to populate the internal modules list.\n\n#### Returns\n\n| Type | Description |\n|---|---|\n| List[ModuleDoc] | A list containing all uniquely documented modules found. |"}, {"name": "_parse_file", "signature": "_parse_file(self, file_path: str, module_name: str)", "docstring": "Parses a single Python file using the ast module.\n\nExtracts the module-level docstring, classes, functions, and specially annotated variables,\nformatting them with properties and typing information.\n\n#### Args\n\n| Name | Type | Description |\n|---|---|---|\n| file_path | str | Path to the .py file. |\n| module_name | str | Dot-separated module name used for the documentation title. |\n\n#### Returns\n\n| Type | Description |\n|---|---|\n| ModuleDoc | Module object containing extracted and grouped documentation structures. |"}, {"name": "_extract_metadata", "signature": "_extract_metadata(self, docstring: str, original_name: str)", "docstring": "Extracts Wikin-specific metadata from the module docstring.\n\nAllows modules to formally override their display name by including a special \nYAML-like snippet in their root docstring block.\n\n#### Args\n\n| Name | Type | Description |\n|---|---|---|\n| docstring | str | The raw module docstring block. |\n| original_name | str | The default dot-separated underlying module name. |\n\n#### Returns\n\n| Type | Description |\n|---|---|\n| tuple | A tuple mapping `(display_name, cleaned_docstring)`. |"}, {"name": "_process_docstring", "signature": "_process_docstring(self, text: Optional[str])", "docstring": "Parses Google and Numpy style docstrings and converts their sections into Markdown tables.\n\nThis function sequentially detects specific section headers such as `Args:`, `Returns:`, and `Raises:` \nto dynamically generate strict markdown tables inside the description string.\n\n#### Args\n\n| Name | Type | Description |\n|---|---|---|\n| text | Optional[str] | The original unformatted docstring representation. |\n\n#### Returns\n\n| Type | Description |\n|---|---|\n| str | Flow-processed docstring containing fully constructed Markdown table elements. |"}, {"name": "_parse_function", "signature": "_parse_function(self, node: ast.AST, source: str)", "docstring": "Internal helper to create a FunctionDoc from an AST node.\n\nConstructs the full function formatting structure, building definitions containing type hints, \ndecorators (`@property`, `@classmethod`), async structures, and argument names.\n\n#### Args\n\n| Name | Type | Description |\n|---|---|---|\n| node | ast.AST | The AST representation block dictating the function or method footprint. |\n| source | str | Processed full text representation of the file code, used specifically for matching exact inline python 3.8 constraints. |\n\n#### Returns\n\n| Type | Description |\n|---|---|\n| FunctionDoc | Documented container including function's name wrapper, generated signature path, and attached processed docstring block. |"}]}]};