| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0bbcad7 commit 06871ee
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,6 +8,7 @@ Module contents | |||
| 8 | 8 | :members: | |
| 9 | 9 | :undoc-members: | |
| 10 | 10 | :show-inheritance: | |
| 11 | + :noindex: | ||
| 11 | 12 | ||
| 12 | 13 | .. autoclass:: gitlab.Gitlab | |
| 13 | 14 | :members: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,10 +19,30 @@ | |||
| 19 | 19 | import sys | |
| 20 | 20 | from datetime import datetime | |
| 21 | 21 | ||
| 22 | + from sphinx.domains.python import PythonDomain | ||
| 23 | + | ||
| 22 | 24 | sys.path.append("../") | |
| 23 | 25 | sys.path.append(os.path.dirname(__file__)) | |
| 24 | 26 | import gitlab # noqa: E402. Needed purely for readthedocs' build | |
| 25 | 27 | ||
| 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 | + class PatchedPythonDomain(PythonDomain): | ||
| 34 | + def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode): | ||
| 35 | + if "refspecific" in node: | ||
| 36 | + del node["refspecific"] | ||
| 37 | + return super(PatchedPythonDomain, self).resolve_xref( | ||
| 38 | + env, fromdocname, builder, typ, target, node, contnode | ||
| 39 | + ) | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + def setup(sphinx): | ||
| 43 | + sphinx.add_domain(PatchedPythonDomain, override=True) | ||
| 44 | + | ||
| 45 | + | ||
| 26 | 46 | on_rtd = os.environ.get("READTHEDOCS", None) == "True" | |
| 27 | 47 | year = datetime.now().year | |
| 28 | 48 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments