Skip to content

Commit

Permalink
docs: Link directly to parser options in Griffe's docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Sep 11, 2023
1 parent 1ae8dd8 commit ee021be
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions docs/usage/configuration/docstrings.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,11 @@ def greet(name: str) -> str:

The options for the docstring parser.

Both Google and Numpy styles offer the following options:

- `ignore_init_summary` ([`bool`][], default `False`): whether to discard
the one-line summary of `__init__` methods.
It is useful when combined with the [`merge_init_into_class`][] option.
- `trim_doctest_flags` ([`bool`][], default `True`): remove the
[doctest flags](https://docs.python.org/3/library/doctest.html#option-flags){ .external }
written as comments in `pycon` snippets within a docstring. These flags are used
to alter the behavior of [`doctest`][] when testing docstrings,
and should not be visible in your docs.
- [Google-style options](https://mkdocstrings.github.io/griffe/docstrings/#parser-options){ .external }
- [Numpydoc-style options](https://mkdocstrings.github.io/griffe/docstrings/#parser-options_1){ .external }

The Sphinx style does not offer any option.

See the API documentation of the available parsers in [`griffe.docstrings`][].

```yaml title="in mkdocs.yml (global configuration)"
plugins:
- mkdocstrings:
Expand All @@ -112,7 +102,6 @@ plugins:
docstring_options:
ignore_init_summary: false
trim_doctest_flags: true
```

```md title="or in docs/some_page.md (local configuration)"
Expand Down

0 comments on commit ee021be

Please sign in to comment.