mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
move the translations to a named variable
This commit is contained in:
parent
697fc8b16c
commit
fa760c326a
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user