Skip to content

Commit

Permalink
Fix type checking in apidoc/json/domain.py
Browse files Browse the repository at this point in the history
Previously, mypy issued the following warning regarding _render_body:

By default the bodies of untyped functions are not checked, consider
using --check-untyped-defs [annotation-unchecked]
  • Loading branch information
jbms committed Jan 2, 2023
1 parent b9b9182 commit c4f1c40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sphinx_immaterial/apidoc/json/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,11 @@ def _parse_rst_from_schema_string(
*self._get_source_info_from_schema_string(source_string),
)

def _render_body(self):
def _render_body(self) -> List[docutils.nodes.Node]:
"""Renders the body of the schema."""
schema_data: LoadedSchemaData = getattr(self.env, "json_schema_data")
schema_node = self._schema_entry.schema
result = []
result: List[docutils.nodes.Node] = []

if self._rendered_title is not None:
p = self._rendered_title
Expand Down

0 comments on commit c4f1c40

Please sign in to comment.