Skip to content

Commit

Permalink
feat(relative-refs): add and document a new relative_crossrefs conf…
Browse files Browse the repository at this point in the history
…ig setting
  • Loading branch information
lmmx committed Jan 13, 2024
1 parent 03e53e3 commit 83e5992
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ plugins:
inherited_members: true
merge_init_into_class: true
preload_modules: [mkdocstrings]
relative_crossrefs: true
separate_signature: true
show_root_heading: true
show_root_full_path: false
Expand Down
2 changes: 2 additions & 0 deletions src/mkdocstrings_handlers/python/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class PythonHandler(BaseHandler):
default_config: ClassVar[dict] = {
"docstring_style": "google",
"docstring_options": {},
"relative_crossrefs": True,
"show_symbol_type_heading": False,
"show_symbol_type_toc": False,
"show_root_heading": False,
Expand Down Expand Up @@ -158,6 +159,7 @@ class PythonHandler(BaseHandler):
docstring_options (dict): The options for the docstring parser. See parsers under [`griffe.docstrings`][].
docstring_section_style (str): The style used to render docstring sections. Options: `table`, `list`, `spacy`. Default: `"table"`.
merge_init_into_class (bool): Whether to merge the `__init__` method into the class' signature and docstring. Default: `False`.
relative_crossrefs (bool): Whether to expand `.`-prefixed references relative to the qualname and import path. Default: `True`.
show_if_no_docstring (bool): Show the object heading even if it has no docstring or children with docstrings. Default: `False`.
show_docstring_attributes (bool): Whether to display the "Attributes" section in the object's docstring. Default: `True`.
show_docstring_functions (bool): Whether to display the "Functions" or "Methods" sections in the object's docstring. Default: `True`.
Expand Down

0 comments on commit 83e5992

Please sign in to comment.