diff --git a/docs/conf.py b/docs/conf.py index 904aacdc07..a1995ce1d5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -5,7 +5,7 @@ extensions = ["sphinx.ext.autodoc", "sphinx.ext.extlinks"] exclude_patterns = ["_build"] -source_suffix = ".rst" +source_suffix = {".rst": "restructuredtext"} master_doc = "index" project = "beets" @@ -66,7 +66,7 @@ "logo": { "text": "beets", }, - "pygment_light_style": "bw", + "pygments_light_style": "bw", } html_title = "beets" html_logo = "_static/beets_logo_nobg.png" diff --git a/extra/release.py b/extra/release.py index e1c036b286..81e0129686 100755 --- a/extra/release.py +++ b/extra/release.py @@ -46,6 +46,8 @@ def from_line(cls, line: str) -> Ref: Each line has the following structure: [optional title : ] + See the output of + python -m sphinx.ext.intersphinx docs/_build/html/objects.inv """ if len(line_parts := line.split(" ", 1)) == 1: return cls(line, None, None) @@ -82,10 +84,11 @@ def get_refs() -> dict[str, Ref]: with redirect_stdout(captured_output): intersphinx.inspect_main([str(objects_filepath)]) + lines = captured_output.getvalue().replace("\t", " ").splitlines() return { r.id: r - for ln in captured_output.getvalue().split("\n") - if ln.startswith("\t") and (r := Ref.from_line(ln.strip())) + for ln in lines + if ln.startswith(" ") and (r := Ref.from_line(ln.strip())) }