summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-domain-py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/roots/test-domain-py-python_maximum_signature_line_length/index.rst13
-rw-r--r--tests/roots/test-domain-py/index.rst1
-rw-r--r--tests/roots/test-domain-py/module.rst3
-rw-r--r--tests/roots/test-domain-py/roles.rst6
-rw-r--r--tests/roots/test-domain-py/type_alias.rst15
5 files changed, 38 insertions, 0 deletions
diff --git a/tests/roots/test-domain-py-python_maximum_signature_line_length/index.rst b/tests/roots/test-domain-py-python_maximum_signature_line_length/index.rst
index 75e4683..9715500 100644
--- a/tests/roots/test-domain-py-python_maximum_signature_line_length/index.rst
+++ b/tests/roots/test-domain-py-python_maximum_signature_line_length/index.rst
@@ -4,3 +4,16 @@ domain-py-maximum_signature_line_length
.. py:function:: hello(name: str) -> str
.. py:function:: foo([a, [b, ]]c, d[, e, f])
+
+.. py:function:: generic_arg[T]
+
+.. py:function:: generic_foo[T]()
+
+.. py:function:: generic_bar[T](x: list[T])
+
+.. py:function:: generic_ret[R]() -> R
+
+.. py:class:: MyGenericClass[X]
+
+.. py:class:: MyList[T](list[T])
+
diff --git a/tests/roots/test-domain-py/index.rst b/tests/roots/test-domain-py/index.rst
index b24bbea..71e45f7 100644
--- a/tests/roots/test-domain-py/index.rst
+++ b/tests/roots/test-domain-py/index.rst
@@ -8,3 +8,4 @@ test-domain-py
module_option
abbr
canonical
+ type_alias
diff --git a/tests/roots/test-domain-py/module.rst b/tests/roots/test-domain-py/module.rst
index 70098f6..307e786 100644
--- a/tests/roots/test-domain-py/module.rst
+++ b/tests/roots/test-domain-py/module.rst
@@ -64,3 +64,6 @@ module
.. py:data:: test2
:type: typing.Literal[-2]
+
+.. py:type:: MyType1
+ :canonical: list[int | str]
diff --git a/tests/roots/test-domain-py/roles.rst b/tests/roots/test-domain-py/roles.rst
index 6bff2d2..d3492ce 100644
--- a/tests/roots/test-domain-py/roles.rst
+++ b/tests/roots/test-domain-py/roles.rst
@@ -5,14 +5,19 @@ roles
.. py:method:: top_level
+.. py:type:: TopLevelType
+
* :py:class:`TopLevel`
* :py:meth:`top_level`
+* :py:type:`TopLevelType`
.. py:class:: NestedParentA
* Link to :py:meth:`child_1`
+ .. py:type:: NestedTypeA
+
.. py:method:: child_1()
* Link to :py:meth:`NestedChildA.subchild_2`
@@ -46,3 +51,4 @@ roles
* Link to :py:class:`NestedParentB`
* :py:class:`NestedParentA.NestedChildA`
+* :py:type:`NestedParentA.NestedTypeA`
diff --git a/tests/roots/test-domain-py/type_alias.rst b/tests/roots/test-domain-py/type_alias.rst
new file mode 100644
index 0000000..6a3df44
--- /dev/null
+++ b/tests/roots/test-domain-py/type_alias.rst
@@ -0,0 +1,15 @@
+Type Alias
+==========
+
+.. py:module:: module_two
+
+ .. py:class:: SomeClass
+
+:py:type:`.MyAlias`
+:any:`MyAlias`
+:any:`module_one.MyAlias`
+
+.. py:module:: module_one
+
+ .. py:type:: MyAlias
+ :canonical: list[int | module_two.SomeClass]