Debian Codegraph @

tests/roots/test-domain-py-xref-type-alias/index.rst

raw
1 Type Alias Cross-Reference Test
2 ===============================
3
4 This tests that type aliases in function signatures can be cross-referenced properly.
5
6
7 .. py:module:: alias_module
8
9 Module to test type alias cross-reference resolution.
10
11
12 .. py:data:: Handler
13 :module: alias_module
14
15 A generic type alias for error handlers
16
17 alias of :py:class:`type`\ [:py:class:`Exception`]
18
19
20 .. py:type:: HandlerType
21 :module: alias_module
22 :canonical: type[Exception]
23
24 A PEP 695 type alias for error handlers
25
26
27 .. py:data:: pathlike
28 :module: alias_module
29 :value: str | pathlib.Path
30
31 Any type of path
32
33
34 .. py:function:: process_error(handler: Handler, other: ~alias_module.HandlerType) -> str
35 :module: alias_module
36
37 Process an error with a custom handler type.
38
39 Tests generic type alias cross-reference resolution.
40
41
42 .. py:function:: read_file(path: pathlike) -> bytes
43 :module: alias_module
44
45 Read a file and return its contents.
46
47 Tests Union type alias cross-reference resolution.