From 5bb0bb4be543fd5eca41673696a62ed80d493591 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 5 Jun 2024 18:20:58 +0200 Subject: Adding upstream version 7.3.7. Signed-off-by: Daniel Baumann --- tests/roots/test-ext-napoleon-paramtype/conf.py | 15 ++++++++++++ tests/roots/test-ext-napoleon-paramtype/index.rst | 8 +++++++ .../test-ext-napoleon-paramtype/pkg/__init__.py | 0 tests/roots/test-ext-napoleon-paramtype/pkg/bar.py | 10 ++++++++ tests/roots/test-ext-napoleon-paramtype/pkg/foo.py | 27 ++++++++++++++++++++++ 5 files changed, 60 insertions(+) create mode 100644 tests/roots/test-ext-napoleon-paramtype/conf.py create mode 100644 tests/roots/test-ext-napoleon-paramtype/index.rst create mode 100644 tests/roots/test-ext-napoleon-paramtype/pkg/__init__.py create mode 100644 tests/roots/test-ext-napoleon-paramtype/pkg/bar.py create mode 100644 tests/roots/test-ext-napoleon-paramtype/pkg/foo.py (limited to 'tests/roots/test-ext-napoleon-paramtype') 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 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] + """ -- cgit v1.2.3