diff options
Diffstat (limited to '')
5 files changed, 60 insertions, 0 deletions
diff --git a/tests/roots/test-ext-napoleon-paramtype/conf.py b/tests/roots/test-ext-napoleon-paramtype/conf.py new file mode 100644 index 0000000..34e2274 --- /dev/null +++ b/tests/roots/test-ext-napoleon-paramtype/conf.py @@ -0,0 +1,15 @@ +import os +import sys + +sys.path.insert(0, os.path.abspath('.')) +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.napoleon', + 'sphinx.ext.intersphinx' +] + +# Python inventory is manually created in the test +# in order to avoid creating a real HTTP connection +intersphinx_mapping = {} +intersphinx_cache_limit = 0 +intersphinx_disabled_reftypes = []
\ No newline at end of file diff --git a/tests/roots/test-ext-napoleon-paramtype/index.rst b/tests/roots/test-ext-napoleon-paramtype/index.rst new file mode 100644 index 0000000..5540897 --- /dev/null +++ b/tests/roots/test-ext-napoleon-paramtype/index.rst @@ -0,0 +1,8 @@ +test-ext-napoleon +================= + +.. automodule:: pkg.bar + :members: + +.. automodule:: pkg.foo + :members: diff --git a/tests/roots/test-ext-napoleon-paramtype/pkg/__init__.py b/tests/roots/test-ext-napoleon-paramtype/pkg/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/roots/test-ext-napoleon-paramtype/pkg/__init__.py diff --git a/tests/roots/test-ext-napoleon-paramtype/pkg/bar.py b/tests/roots/test-ext-napoleon-paramtype/pkg/bar.py new file mode 100644 index 0000000..e1ae794 --- /dev/null +++ b/tests/roots/test-ext-napoleon-paramtype/pkg/bar.py @@ -0,0 +1,10 @@ +class Bar: + """The bar.""" + def list(self) -> None: + """A list method.""" + + @staticmethod + def int() -> float: + """An int method.""" + return 1.0 + diff --git a/tests/roots/test-ext-napoleon-paramtype/pkg/foo.py b/tests/roots/test-ext-napoleon-paramtype/pkg/foo.py new file mode 100644 index 0000000..6979f9e --- /dev/null +++ b/tests/roots/test-ext-napoleon-paramtype/pkg/foo.py @@ -0,0 +1,27 @@ +class Foo: + """The foo.""" + def do( + self, + *, + keyword_paramtype, + keyword_kwtype, + kwarg_paramtype, + kwarg_kwtype, + kwparam_paramtype, + kwparam_kwtype, + ): + """Some method. + + :keyword keyword_paramtype: some param + :paramtype keyword_paramtype: list[int] + :keyword keyword_kwtype: some param + :kwtype keyword_kwtype: list[int] + :kwarg kwarg_paramtype: some param + :paramtype kwarg_paramtype: list[int] + :kwarg kwarg_kwtype: some param + :kwtype kwarg_kwtype: list[int] + :kwparam kwparam_paramtype: some param + :paramtype kwparam_paramtype: list[int] + :kwparam kwparam_kwtype: some param + :kwtype kwparam_kwtype: list[int] + """ |