Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ source = 'vcs'
[tool.hatch.build.hooks.vcs]
version-file = 'src/scanpydoc/_version.py'

[tool.hatch.envs.docs]
features = ['doc']
[tool.hatch.envs.docs.scripts]
build = 'sphinx-build -M html docs docs/_build/html'

[[tool.hatch.envs.test.matrix]]
python = ['3.8', '3.9', '3.10', '3.11']
[tool.hatch.envs.test]
Expand Down
4 changes: 2 additions & 2 deletions src/scanpydoc/definition_list_typed_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def handle_item(

field_name = nodes.field_name("", self.label)
assert not self.can_collapse
# “simple” for pydata sphinx theme
body_node = self.list_type(classes=["simple"])
# “field-list” for pydata sphinx theme
body_node = self.list_type(classes=["field-list"])
for field_arg, content in items:
body_node += handle_item(field_arg, content)
field_body = nodes.field_body("", body_node)
Expand Down
1 change: 0 additions & 1 deletion src/scanpydoc/elegant_typehints/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ def example_func(a: str | None, b: str | int | None = None) -> dict[str, int]:
Hover over the parameter and return type annotations to see the long versions.

Args:
----
a: An example parameter
b: Another, with a default
Returns:
Expand Down
2 changes: 0 additions & 2 deletions src/scanpydoc/elegant_typehints/formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ def format_annotation(annotation: type[Any], config: Config) -> str | None:
it tries to achieve a simpler style as seen in numeric packages like numpy.

Args:
----
annotation: A type or class used as type annotation.
config: Sphinx config containing ``sphinx-autodoc-typehints``’s options.

Returns:
-------
reStructuredText describing the type
"""
curframe = inspect.currentframe()
Expand Down
2 changes: 0 additions & 2 deletions src/scanpydoc/rtd_github_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,9 @@ def github_url(qualname: str) -> str:
"""Get the full GitHub URL for some object’s qualname.

Args:
----
qualname: The full qualified name of a function, class, method or module

Returns:
-------
A GitHub URL derived from the :confval:`html_context`.
"""
try:
Expand Down