{"id":23822,"library":"griffe-typingdoc","title":"griffe-typingdoc","description":"Griffe extension for PEP 727 – Documentation Metadata in Typing. Extracts documentation from type annotations (e.g., typing.Annotated with Doc) and attaches them to docstring sections. Current version: 0.3.1. Release cadence: irregular, ~monthly.","status":"active","version":"0.3.1","language":"python","source_language":"en","source_url":"https://github.com/mkdocstrings/griffe-typingdoc","tags":["griffe","typing","docstrings","pep727","extension"],"install":[{"cmd":"pip install griffe-typingdoc","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Core dependency for Griffe introspection (since 0.3.1, replaced griffe).","package":"griffelib","optional":false}],"imports":[{"note":"Common mistake: wrong class name; the extension class is GriffeTypingDoc.","wrong":"from griffe_typingdoc import PlutoSaver","symbol":"GriffeTypingDoc","correct":"from griffe_typingdoc import GriffeTypingDoc"},{"note":"Used in combination with GriffeTypingDoc to load modules.","symbol":"PythonFile","correct":"from griffe import PythonFile"}],"quickstart":{"code":"import ast\nfrom griffe import PythonFile, load_git\nfrom griffe_typingdoc import GriffeTypingDoc\n\n# Load a module\nmodule = load_git('some_package', repo_path='.')\n# Create an extension instance\nextension = GriffeTypingDoc()\n# Apply extension to parse typing doc\nextension.do(module)","lang":"python","description":"Load a Python module and apply the GriffeTypingDoc extension to extract PEP 727 documentation metadata."},"warnings":[{"fix":"Install griffelib: `pip install griffelib` (or update your requirements).","message":"In version 0.3.1, the dependency changed from 'griffe' to 'griffelib'. Install 'griffelib' separately, or upgrading may break if you had pinned an older Griffe version.","severity":"breaking","affected_versions":">=0.3.1"},{"fix":"Ensure you use `Doc` from `annotated_doc` (e.g., `from annotated_doc import Doc`) and wrap your doc string as `Doc(\"...\")`.","message":"The extension only adds docstring sections for elements annotated with `typing.Annotated` using `Doc` (e.g., `Annotated[str, Doc(\"description\")]`). If you use a simple string or another object, it won't be extracted.","severity":"gotcha","affected_versions":"all"},{"fix":"Load the entire package with `load_git` or similar before calling `extension.do(...)`.","message":"The extension requires the package to be fully loaded before static analysis starts. Dead code or circular imports may cause incomplete analysis.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from griffe_typingdoc import GriffeTypingDoc`.","cause":"Wrong import: PlutoSaver is an example from another library, not griffe-typingdoc.","error":"AttributeError: module 'griffe_typingdoc' has no attribute 'PlutoSaver'"},{"fix":"Ensure you have version 0.3.1 or later: `pip install griffe-typingdoc --upgrade`.","cause":"The package might be incorrectly installed or outdated.","error":"ImportError: cannot import name 'GriffeTypingDoc' from 'griffe_typingdoc'"},{"fix":"Pass a module object: `extension.do(module)` where module is from `griffe.load_git()` or `griffe.PythonFile`.","cause":"Calling do() without any arguments.","error":"TypeError: extension.do() missing 1 required positional argument: 'module'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}