Debian Codegraph @

tests/test_util/intersphinx_data.py

raw
1 from __future__ import annotations
2
3 import zlib
4 from typing import TYPE_CHECKING
5
6 if TYPE_CHECKING:
7 from typing import Final
8
9 INVENTORY_V1: Final[bytes] = b"""\
10 # Sphinx inventory version 1
11 # Project: foo
12 # Version: 1.0
13 module mod foo.html
14 module.cls class foo.html
15 """
16
17 INVENTORY_V2: Final[bytes] = b"""\
18 # Sphinx inventory version 2
19 # Project: foo
20 # Version: 2.0
21 # The remainder of this file is compressed with zlib.
22 """ + zlib.compress(b"""\
23 module1 py:module 0 foo.html#module-module1 Long Module desc
24 module2 py:module 0 foo.html#module-$ -
25 module1.func py:function 1 sub/foo.html#$ -
26 module1.Foo.bar py:method 1 index.html#foo.Bar.baz -
27 CFunc c:function 2 cfunc.html#CFunc -
28 std cpp:type 1 index.html#std -
29 std::uint8_t cpp:type 1 index.html#std_uint8_t -
30 foo::Bar cpp:class 1 index.html#cpp_foo_bar -
31 foo::Bar::baz cpp:function 1 index.html#cpp_foo_bar_baz -
32 foons cpp:type 1 index.html#foons -
33 foons::bartype cpp:type 1 index.html#foons_bartype -
34 a term std:term -1 glossary.html#term-a-term -
35 ls.-l std:cmdoption 1 index.html#cmdoption-ls-l -
36 docname std:doc -1 docname.html -
37 foo js:module 1 index.html#foo -
38 foo.bar js:class 1 index.html#foo.bar -
39 foo.bar.baz js:method 1 index.html#foo.bar.baz -
40 foo.bar.qux js:data 1 index.html#foo.bar.qux -
41 a term including:colon std:term -1 glossary.html#term-a-term-including-colon -
42 The-Julia-Domain std:label -1 write_inventory/#$ The Julia Domain
43 """)
44
45 INVENTORY_V2_NO_VERSION: Final[bytes] = b"""\
46 # Sphinx inventory version 2
47 # Project: foo
48 # Version:
49 # The remainder of this file is compressed with zlib.
50 """ + zlib.compress(b"""\
51 module1 py:module 0 foo.html#module-module1 Long Module desc
52 """)
53
54 INVENTORY_V2_AMBIGUOUS_TERMS: Final[bytes] = b"""\
55 # Sphinx inventory version 2
56 # Project: foo
57 # Version: 2.0
58 # The remainder of this file is compressed with zlib.
59 """ + zlib.compress(b"""\
60 a term std:term -1 glossary.html#term-a-term -
61 A term std:term -1 glossary.html#term-a-term -
62 b term std:term -1 document.html#id5 -
63 B term std:term -1 document.html#B -
64 """)
65
66 INVENTORY_V2_TEXT_VERSION: Final[bytes] = b"""\
67 # Sphinx inventory version 2
68 # Project: foo
69 # Version: stable
70 # The remainder of this file is compressed with zlib.
71 """ + zlib.compress(b"""\
72 module1 py:module 0 foo.html#module-module1 Long Module desc
73 """)