Skip to content

Commit

Permalink
prune intersphinx and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Robpol86 committed Sep 29, 2024
1 parent 5775948 commit 9d0f8b9
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
exclude_patterns = ["_build"]
extensions = [
"myst_parser", # https://myst-parser.readthedocs.io
"sphinx.ext.autodoc",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx_imgur.imgur", # https://sphinx-imgur.readthedocs.io
"sphinx_sitemap", # https://github.com/jdillard/sphinx-sitemap
"sphinxcontrib.youtube", # https://github.com/sphinx-contrib/youtube
"sphinx_sitemap", # https://sphinx-sitemap.readthedocs.io
"sphinxcontrib.youtube", # https://sphinxcontrib-youtube.readthedocs.io
"ablog", # https://ablog.readthedocs.io/
]
language = "en"
Expand Down Expand Up @@ -169,37 +166,6 @@
sitemap_url_scheme = "{link}"


def parse_event(env, sig, signode):
event_sig_re = re.compile(r"([a-zA-Z-]+)\s*\((.*)\)")
m = event_sig_re.match(sig)
if not m:
signode += addnodes.desc_name(sig, sig)
return sig
name, args = m.groups()
signode += addnodes.desc_name(name, name)
plist = addnodes.desc_parameterlist()
for arg in args.split(","):
arg = arg.strip()
plist += addnodes.desc_parameter(arg, arg)
signode += plist
return name


def setup(app):
from sphinx.ext.autodoc import cut_lines
from sphinx.util.docfields import GroupedField

app.connect("autodoc-process-docstring", cut_lines(4, what=["module"]))
app.add_object_type(
"confval",
"confval",
objname="configuration value",
indextemplate="pair: %s; configuration value",
)
fdesc = GroupedField("parameter", label="Parameters", names=["param"], can_collapse=True)
app.add_object_type("event", "event", "pair: %s; event", parse_event, doc_field_types=[fdesc])


"""
TODOs:
* Diff: support multiple branches? Store in git lfs or artifacts? Cleanup after n days?
Expand Down

0 comments on commit 9d0f8b9

Please sign in to comment.