Skip to content

Commit 7e2158f

Browse files
committed
docs(fonts[lint]): add docstrings to sphinx_fonts extension
why: ruff D101/D103 rules flag missing docstrings on SetupDict and setup(), causing CI lint failures in repos that lint docs/_ext/. what: - Add docstring to SetupDict TypedDict class - Add docstring to setup() function
1 parent c897a27 commit 7e2158f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

docs/_ext/sphinx_fonts.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626

2727
class SetupDict(t.TypedDict):
28+
"""Return type for Sphinx extension setup()."""
29+
2830
version: str
2931
parallel_read_safe: bool
3032
parallel_write_safe: bool
@@ -135,6 +137,7 @@ def _on_html_page_context(
135137

136138

137139
def setup(app: Sphinx) -> SetupDict:
140+
"""Register config values, events, and return extension metadata."""
138141
app.add_config_value("sphinx_fonts", [], "html")
139142
app.add_config_value("sphinx_font_fallbacks", [], "html")
140143
app.add_config_value("sphinx_font_css_variables", {}, "html")

0 commit comments

Comments
 (0)