Skip to content

Commit

Permalink
Fix formatting of renderers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodmane committed Sep 23, 2023
1 parent 048e988 commit 21b3cae
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sphinx_js/renderers.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,13 @@ def _return_formatter(self, return_: Return) -> tuple[list[str], str]:
tail += return_.description
return ["returns"], tail


def _type_param_formatter(self, tparam: TypeParam) -> tuple[list[str], str] | None:
v = tparam.name
if tparam.extends:
v += f" extends {tparam.extends}"
heads = ["typeparam", v]
return heads, tparam.description


def _param_formatter(self, param: Param) -> tuple[list[str], str] | None:
"""Derive heads and tail from ``@param`` blocks."""
if not param.type and not param.description:
Expand All @@ -232,7 +230,6 @@ def _param_formatter(self, param: Param) -> tuple[list[str], str] | None:
tail = param.description
return heads, tail


def _param_type_formatter(self, param: Param) -> tuple[list[str], str] | None:
"""Generate types for function parameters specified in field."""
if not param.type:
Expand All @@ -241,7 +238,6 @@ def _param_type_formatter(self, param: Param) -> tuple[list[str], str] | None:
tail = rst.escape(param.type)
return heads, tail


def _exception_formatter(self, exception: Exc) -> tuple[list[str], str]:
"""Derive heads and tail from ``@throws`` blocks."""
heads = ["throws"]
Expand All @@ -250,7 +246,6 @@ def _exception_formatter(self, exception: Exc) -> tuple[list[str], str]:
tail = exception.description
return heads, tail


def _fields(self, obj: TopLevel) -> Iterator[tuple[list[str], str]]:
"""Return an iterable of "info fields" to be included in the directive,
like params, return values, and exceptions.
Expand Down

0 comments on commit 21b3cae

Please sign in to comment.