diff options
author | Keewis <keewis@posteo.de> | 2020-08-04 11:30:14 +0200 |
---|---|---|
committer | Keewis <keewis@posteo.de> | 2020-08-04 11:30:14 +0200 |
commit | fa760c326a1a96e9fe9f373b9b94757dd636e12f (patch) | |
tree | 3ba9ef61ec9f56c278968fcd1f23a76ed62cd37d | |
parent | 697fc8b16c211dc8515afd3f6df8d7c3baca469d (diff) | |
download | sphinx-git-fa760c326a1a96e9fe9f373b9b94757dd636e12f.tar.gz |
move the translations to a named variable
-rw-r--r-- | tests/test_ext_napoleon_docstring.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/test_ext_napoleon_docstring.py b/tests/test_ext_napoleon_docstring.py index 017737387..991e5a232 100644 --- a/tests/test_ext_napoleon_docstring.py +++ b/tests/test_ext_napoleon_docstring.py @@ -1687,12 +1687,11 @@ ndarray :Yields: :term:`scalar` or :class:`array-like <numpy.ndarray>` -- The result of the computation """) - config = Config( - napoleon_type_aliases={ - "scalar": ":term:`scalar`", - "array-like": ":class:`array-like <numpy.ndarray>`", - } - ) + translations = { + "scalar": ":term:`scalar`", + "array-like": ":class:`array-like <numpy.ndarray>`", + } + config = Config(napoleon_type_aliases=translations) app = mock.Mock() actual = str(NumpyDocstring(docstring, config, app, "method")) self.assertEqual(expected, actual) |