Files
sphinx/tests
Chris Barrick 8d75ae2d6b Napoleon: Unify the type preprocessing logic
Previously, there were two type preprocessing functions:
`_convert_type_spec` (used in Google-style docstrings) and
`_convert_numpy_type_spec` (used in Numpy-style docstrings).

The Google version simply applied type-alias translations or wrapped
the text in a `:py:class:` role.

The Numpy version does the same, plus adds special handling for keywords
`optional` and `default` and delimiter words `or`, `of`, and `and`. This
allows one to write in natural language, like `Array of int` instead of
`Array[int]` or `Widget, optional` instead of `Optional[Widget]` or
`Widget | None`. Numpy style is described in full at:
https://numpydoc.readthedocs.io/en/latest/format.html#parameters

This commit eliminates the distinction and allows Google-style
docstrings to use these preprocessing rules.
2025-01-05 01:18:29 +00:00
..
2025-01-02 23:53:59 +00:00
2020-11-20 19:43:02 +01:00
2024-07-10 14:13:10 +01:00
2024-11-03 02:55:19 +00:00