Skip to content

Commit c1a5e37

Browse files
authored
Fix pydata theme compat for real (#70)
1 parent ed3f65f commit c1a5e37

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ source = 'vcs'
6161
[tool.hatch.build.hooks.vcs]
6262
version-file = 'src/scanpydoc/_version.py'
6363

64+
[tool.hatch.envs.docs]
65+
features = ['doc']
66+
[tool.hatch.envs.docs.scripts]
67+
build = 'sphinx-build -M html docs docs/_build/html'
68+
6469
[[tool.hatch.envs.test.matrix]]
6570
python = ['3.8', '3.9', '3.10', '3.11']
6671
[tool.hatch.envs.test]

src/scanpydoc/definition_list_typed_field.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ def handle_item(
6868

6969
field_name = nodes.field_name("", self.label)
7070
assert not self.can_collapse
71-
# “simple” for pydata sphinx theme
72-
body_node = self.list_type(classes=["simple"])
71+
# “field-list” for pydata sphinx theme
72+
body_node = self.list_type(classes=["field-list"])
7373
for field_arg, content in items:
7474
body_node += handle_item(field_arg, content)
7575
field_body = nodes.field_body("", body_node)

src/scanpydoc/elegant_typehints/example.py

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ def example_func(a: str | None, b: str | int | None = None) -> dict[str, int]:
77
Hover over the parameter and return type annotations to see the long versions.
88
99
Args:
10-
----
1110
a: An example parameter
1211
b: Another, with a default
1312
Returns:

src/scanpydoc/elegant_typehints/formatting.py

-2
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,10 @@ def format_annotation(annotation: type[Any], config: Config) -> str | None:
8585
it tries to achieve a simpler style as seen in numeric packages like numpy.
8686
8787
Args:
88-
----
8988
annotation: A type or class used as type annotation.
9089
config: Sphinx config containing ``sphinx-autodoc-typehints``’s options.
9190
9291
Returns:
93-
-------
9492
reStructuredText describing the type
9593
"""
9694
curframe = inspect.currentframe()

src/scanpydoc/rtd_github_links.py

-2
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,9 @@ def github_url(qualname: str) -> str:
110110
"""Get the full GitHub URL for some object’s qualname.
111111
112112
Args:
113-
----
114113
qualname: The full qualified name of a function, class, method or module
115114
116115
Returns:
117-
-------
118116
A GitHub URL derived from the :confval:`html_context`.
119117
"""
120118
try:

0 commit comments

Comments
 (0)