docs: bring docforge docstrings and wiki to GSDFC standard
- fix GSDFC spec contradictions in __init__ docstring (parenthesized types, fenced-block rule) and sync generated README - rewrite docstrings across loaders, models, nav, servers, renderers, cli; sync .pyi stubs - add pydoclint (google style) gate to dev extras and pyproject config - fix mcp nav resources doc:// -> docs:// - refresh docs/lib and docs/mcp, drop stale docforge/ duplicate group - update wiki pages and add GSDFC + MCP guides under 05_development
This commit is contained in:
@@ -20,6 +20,7 @@ modified by doc-forge; only the navigation layout is inferred.
|
||||
"""
|
||||
|
||||
import re
|
||||
from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
@@ -46,7 +47,7 @@ def build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]:
|
||||
Path to the hand-written wiki directory, for example ``docs/wiki``.
|
||||
|
||||
Returns:
|
||||
List[Dict[str, Any]]:
|
||||
list[dict[str, Any]]:
|
||||
Navigation entries compatible with the MkDocs ``nav`` configuration.
|
||||
The list is empty if the wiki contains no Markdown files.
|
||||
|
||||
@@ -75,7 +76,10 @@ def build_wiki_nav(wiki_dir: Path) -> list[dict[str, Any]]:
|
||||
return nav
|
||||
|
||||
|
||||
def _render_entries(base_dir: Path, rel) -> list[dict[str, Any]]:
|
||||
def _render_entries(
|
||||
base_dir: Path,
|
||||
rel: Callable[[Path], str],
|
||||
) -> list[dict[str, Any]]:
|
||||
"""
|
||||
Render navigation entries for the children of a wiki directory.
|
||||
|
||||
@@ -87,11 +91,11 @@ def _render_entries(base_dir: Path, rel) -> list[dict[str, Any]]:
|
||||
base_dir (Path):
|
||||
Directory whose children are rendered.
|
||||
|
||||
rel:
|
||||
rel (Callable[[Path], str]):
|
||||
Callable converting a wiki file path into a docs-relative path.
|
||||
|
||||
Returns:
|
||||
List[Dict[str, Any]]:
|
||||
list[dict[str, Any]]:
|
||||
Navigation entries for ``base_dir`` in natural sort order.
|
||||
"""
|
||||
children = sorted(
|
||||
@@ -152,7 +156,7 @@ def _natural_key(name: str) -> list[object]:
|
||||
Filename or directory name to key.
|
||||
|
||||
Returns:
|
||||
List[object]:
|
||||
list[object]:
|
||||
Mixed list of lowercased strings and integers used for sorting.
|
||||
"""
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user