mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
only transform the types if napoleon_use_param is true
This commit is contained in:
parent
660b818636
commit
cc8baf60ec
@ -1054,11 +1054,12 @@ class NumpyDocstring(GoogleDocstring):
|
||||
_name, _type = line, ''
|
||||
_name, _type = _name.strip(), _type.strip()
|
||||
_name = self._escape_args_and_kwargs(_name)
|
||||
_type = _convert_numpy_type_spec(
|
||||
_type,
|
||||
location=self._get_location(),
|
||||
translations=self._config.napoleon_type_aliases or {},
|
||||
)
|
||||
if self._config.napoleon_use_param:
|
||||
_type = _convert_numpy_type_spec(
|
||||
_type,
|
||||
location=self._get_location(),
|
||||
translations=self._config.napoleon_type_aliases or {},
|
||||
)
|
||||
|
||||
if prefer_type and not _type:
|
||||
_type, _name = _name, _type
|
||||
|
Loading…
Reference in New Issue
Block a user