From 113f8c8515ef82bce6c469f4fc65ae17f19aacd8 Mon Sep 17 00:00:00 2001 From: Philipp A Date: Tue, 4 Jul 2023 11:55:32 +0200 Subject: [PATCH] Fix weird doc changes --- pyproject.toml | 5 +++++ src/scanpydoc/definition_list_typed_field.py | 4 ++-- src/scanpydoc/elegant_typehints/example.py | 1 - src/scanpydoc/elegant_typehints/formatting.py | 2 -- src/scanpydoc/rtd_github_links.py | 2 -- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2d6f829..d5adb3e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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] diff --git a/src/scanpydoc/definition_list_typed_field.py b/src/scanpydoc/definition_list_typed_field.py index 4767ed5..2566b8e 100644 --- a/src/scanpydoc/definition_list_typed_field.py +++ b/src/scanpydoc/definition_list_typed_field.py @@ -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) diff --git a/src/scanpydoc/elegant_typehints/example.py b/src/scanpydoc/elegant_typehints/example.py index 6cc1ed6..e03782d 100644 --- a/src/scanpydoc/elegant_typehints/example.py +++ b/src/scanpydoc/elegant_typehints/example.py @@ -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: diff --git a/src/scanpydoc/elegant_typehints/formatting.py b/src/scanpydoc/elegant_typehints/formatting.py index 5e7523f..8bb38a0 100644 --- a/src/scanpydoc/elegant_typehints/formatting.py +++ b/src/scanpydoc/elegant_typehints/formatting.py @@ -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() diff --git a/src/scanpydoc/rtd_github_links.py b/src/scanpydoc/rtd_github_links.py index 9d0132d..b9402f2 100644 --- a/src/scanpydoc/rtd_github_links.py +++ b/src/scanpydoc/rtd_github_links.py @@ -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: