Skip to content

Commit 5f7b574

Browse files
doc: workaround duplicate object descriptions
Due to DBAPI requirements, Connection and MeshConnection classes expose exceptions as attributes. tarantool module also exposes several exceptions. sphinx raises warnings about duplicate object description due to multiple exception references. Since there is no way to put ``:noindex:`` in docstrings [1] and other solutions (like ``:meta private:``) are completely remove attribute descriptions, this patch removes indexes with rst-level workarounds. 1. https://stackoverflow.com/questions/66736786/can-i-use-noindex-in-python-docstring-with-sphinx-autodoc Part of #67
1 parent 3180ee7 commit 5f7b574

File tree

3 files changed

+203
-0
lines changed

3 files changed

+203
-0
lines changed

Diff for: doc/api/module-tarantool.rst

+111
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,114 @@ module :py:mod:`tarantool`
22
==========================
33

44
.. automodule:: tarantool
5+
:exclude-members: Connection, MeshConnection,
6+
Error, DatabaseError, NetworkError, NetworkWarning,
7+
SchemaError
8+
9+
.. autoclass:: tarantool.Connection
10+
:exclude-members: Error, DatabaseError, InterfaceError,
11+
ConfigurationError, SchemaError, NetworkError,
12+
Warning, DataError, OperationalError, IntegrityError,
13+
InternalError, ProgrammingError, NotSupportedError
14+
15+
.. autoattribute:: Error
16+
:noindex:
17+
18+
.. autoattribute:: DatabaseError
19+
:noindex:
20+
21+
.. autoattribute:: InterfaceError
22+
:noindex:
23+
24+
.. autoattribute:: ConfigurationError
25+
:noindex:
26+
27+
.. autoattribute:: SchemaError
28+
:noindex:
29+
30+
.. autoattribute:: NetworkError
31+
:noindex:
32+
33+
.. autoattribute:: Warning
34+
:noindex:
35+
36+
.. autoattribute:: DataError
37+
:noindex:
38+
39+
.. autoattribute:: OperationalError
40+
:noindex:
41+
42+
.. autoattribute:: IntegrityError
43+
:noindex:
44+
45+
.. autoattribute:: InternalError
46+
:noindex:
47+
48+
.. autoattribute:: ProgrammingError
49+
:noindex:
50+
51+
.. autoattribute:: NotSupportedError
52+
:noindex:
53+
54+
.. autoclass:: tarantool.MeshConnection
55+
:exclude-members: Error, DatabaseError, InterfaceError,
56+
ConfigurationError, SchemaError, NetworkError,
57+
Warning, DataError, OperationalError, IntegrityError,
58+
InternalError, ProgrammingError, NotSupportedError
59+
60+
.. autoattribute:: Error
61+
:noindex:
62+
63+
.. autoattribute:: DatabaseError
64+
:noindex:
65+
66+
.. autoattribute:: InterfaceError
67+
:noindex:
68+
69+
.. autoattribute:: ConfigurationError
70+
:noindex:
71+
72+
.. autoattribute:: SchemaError
73+
:noindex:
74+
75+
.. autoattribute:: NetworkError
76+
:noindex:
77+
78+
.. autoattribute:: Warning
79+
:noindex:
80+
81+
.. autoattribute:: DataError
82+
:noindex:
83+
84+
.. autoattribute:: OperationalError
85+
:noindex:
86+
87+
.. autoattribute:: IntegrityError
88+
:noindex:
89+
90+
.. autoattribute:: InternalError
91+
:noindex:
92+
93+
.. autoattribute:: ProgrammingError
94+
:noindex:
95+
96+
.. autoattribute:: NotSupportedError
97+
:noindex:
98+
99+
.. autoexception:: Error
100+
:noindex:
101+
102+
.. autoexception:: DatabaseError
103+
:noindex:
104+
105+
.. autoexception:: DatabaseError
106+
:noindex:
107+
108+
.. autoexception:: NetworkError
109+
:noindex:
110+
111+
.. autoexception:: NetworkWarning
112+
:noindex:
113+
114+
.. autoexception:: SchemaError
115+
:noindex:

Diff for: doc/api/submodule-connection.rst

+46
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,49 @@ module :py:mod:`tarantool.connection`
22
=====================================
33

44
.. automodule:: tarantool.connection
5+
:exclude-members: Connection
6+
7+
.. autoclass:: tarantool.connection.Connection
8+
:exclude-members: Error, DatabaseError, InterfaceError,
9+
ConfigurationError, SchemaError, NetworkError,
10+
Warning, DataError, OperationalError, IntegrityError,
11+
InternalError, ProgrammingError, NotSupportedError
12+
13+
.. autoattribute:: Error
14+
:noindex:
15+
16+
.. autoattribute:: DatabaseError
17+
:noindex:
18+
19+
.. autoattribute:: InterfaceError
20+
:noindex:
21+
22+
.. autoattribute:: ConfigurationError
23+
:noindex:
24+
25+
.. autoattribute:: SchemaError
26+
:noindex:
27+
28+
.. autoattribute:: NetworkError
29+
:noindex:
30+
31+
.. autoattribute:: Warning
32+
:noindex:
33+
34+
.. autoattribute:: DataError
35+
:noindex:
36+
37+
.. autoattribute:: OperationalError
38+
:noindex:
39+
40+
.. autoattribute:: IntegrityError
41+
:noindex:
42+
43+
.. autoattribute:: InternalError
44+
:noindex:
45+
46+
.. autoattribute:: ProgrammingError
47+
:noindex:
48+
49+
.. autoattribute:: NotSupportedError
50+
:noindex:

Diff for: doc/api/submodule-mesh-connection.rst

+46
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,49 @@ module :py:mod:`tarantool.mesh_connection`
22
==========================================
33

44
.. automodule:: tarantool.mesh_connection
5+
:exclude-members: MeshConnection
6+
7+
.. autoclass:: tarantool.mesh_connection.MeshConnection
8+
:exclude-members: Error, DatabaseError, InterfaceError,
9+
ConfigurationError, SchemaError, NetworkError,
10+
Warning, DataError, OperationalError, IntegrityError,
11+
InternalError, ProgrammingError, NotSupportedError
12+
13+
.. autoattribute:: Error
14+
:noindex:
15+
16+
.. autoattribute:: DatabaseError
17+
:noindex:
18+
19+
.. autoattribute:: InterfaceError
20+
:noindex:
21+
22+
.. autoattribute:: ConfigurationError
23+
:noindex:
24+
25+
.. autoattribute:: SchemaError
26+
:noindex:
27+
28+
.. autoattribute:: NetworkError
29+
:noindex:
30+
31+
.. autoattribute:: Warning
32+
:noindex:
33+
34+
.. autoattribute:: DataError
35+
:noindex:
36+
37+
.. autoattribute:: OperationalError
38+
:noindex:
39+
40+
.. autoattribute:: IntegrityError
41+
:noindex:
42+
43+
.. autoattribute:: InternalError
44+
:noindex:
45+
46+
.. autoattribute:: ProgrammingError
47+
:noindex:
48+
49+
.. autoattribute:: NotSupportedError
50+
:noindex:

0 commit comments

Comments
 (0)