Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06871ee

Browse files
nejchJohnVillalovos
authored andcommitted
chore: patch sphinx for explicit re-exports
1 parent0bbcad7 commit06871ee

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

‎docs/api/gitlab.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Module contents
88
:members:
99
:undoc-members:
1010
:show-inheritance:
11+
:noindex:
1112

1213
..autoclass::gitlab.Gitlab
1314
:members:

‎docs/conf.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,30 @@
1919
importsys
2020
fromdatetimeimportdatetime
2121

22+
fromsphinx.domains.pythonimportPythonDomain
23+
2224
sys.path.append("../")
2325
sys.path.append(os.path.dirname(__file__))
2426
importgitlab# noqa: E402. Needed purely for readthedocs' build
2527

28+
29+
# Sphinx will warn when attributes are exported in multiple places. See workaround:
30+
# https://github.com/sphinx-doc/sphinx/issues/3866#issuecomment-768167824
31+
# This patch can be removed when this issue is resolved:
32+
# https://github.com/sphinx-doc/sphinx/issues/4961
33+
classPatchedPythonDomain(PythonDomain):
34+
defresolve_xref(self,env,fromdocname,builder,typ,target,node,contnode):
35+
if"refspecific"innode:
36+
delnode["refspecific"]
37+
returnsuper(PatchedPythonDomain,self).resolve_xref(
38+
env,fromdocname,builder,typ,target,node,contnode
39+
)
40+
41+
42+
defsetup(sphinx):
43+
sphinx.add_domain(PatchedPythonDomain,override=True)
44+
45+
2646
on_rtd=os.environ.get("READTHEDOCS",None)=="True"
2747
year=datetime.now().year
2848

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp