only transform the types if napoleon_use_param is true

This commit is contained in:
Keewis 2020-07-13 14:25:01 +02:00
parent 660b818636
commit cc8baf60ec

View File

@ -1054,6 +1054,7 @@ class NumpyDocstring(GoogleDocstring):
_name, _type = line, '' _name, _type = line, ''
_name, _type = _name.strip(), _type.strip() _name, _type = _name.strip(), _type.strip()
_name = self._escape_args_and_kwargs(_name) _name = self._escape_args_and_kwargs(_name)
if self._config.napoleon_use_param:
_type = _convert_numpy_type_spec( _type = _convert_numpy_type_spec(
_type, _type,
location=self._get_location(), location=self._get_location(),