Skip to content

Commit d63d894

Browse files
authored
chore: Sphinx version pin, refactor config to set appropriate default (#68) (#97)
* feat: split commit and lint checks * fix: checkout * fix: yaml linter * fix: versioning and #68
1 parent 95e6749 commit d63d894

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

canonical_sphinx/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,14 +220,11 @@ def config_inited(app: Sphinx, config: SphinxConfig) -> None: # noqa: PLR0915,
220220
if (
221221
config.latex_elements == {}
222222
): # pyright: ignore [reportUnnecessaryComparison] type: # ignore[comparison-overlap]
223-
224223
config.latex_elements = ast.literal_eval(config.latex_config)
225224

226225
html_context = config.html_context
227226

228227
disable_feedback_button = config.disable_feedback_button
229-
if html_context.get("github_issues") and not disable_feedback_button:
230-
html_js_files.append("github_issue_links.js")
231228

232229
values_and_defaults = [
233230
("product_tag", "_static/tag.png"),
@@ -244,6 +241,9 @@ def config_inited(app: Sphinx, config: SphinxConfig) -> None: # noqa: PLR0915,
244241
for value, default in values_and_defaults:
245242
html_context.setdefault(value, default)
246243

244+
if html_context.get("github_issues") and not disable_feedback_button:
245+
html_js_files.append("github_issue_links.js")
246+
247247
html_context["has_contributor_listing"] = has_contributor_listing
248248

249249
config.html_js_files.extend(html_js_files)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "canonical-sphinx"
33
dynamic = ["version", "readme"]
44
dependencies = [
5-
"Sphinx",
5+
"Sphinx>=7.1.2",
66
"furo",
77
"myst-parser",
88
"linkify-it-py",

0 commit comments

Comments
 (0)