Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Priyansh121096 committed Oct 8, 2024
1 parent c6b88ed commit d23c260
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sphinx_autodoc_typehints/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def process_signature( # noqa: C901, PLR0913, PLR0917
sph_signature = sphinx_signature(obj, type_aliases=app.config["autodoc_type_aliases"])
typehints_formatter: Callable[..., str | None] | None = getattr(app.config, "typehints_formatter", None)

def _get_formatted_annotation(annotation):
def _get_formatted_annotation(annotation: TypeVar) -> TypeVar:
if typehints_formatter is None:
return annotation
formatted_name = typehints_formatter(annotation)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ def has_doctest1() -> None:
""",
typehints_use_signature=True,
typehints_use_signature_return=True,
typehints_formatter=lambda ann, cfg=None: "Formatted",
typehints_formatter=lambda _, __=None: "Formatted",
)
def typehints_formatter_applied_to_signature(param: Unformatted) -> Unformatted:
"""
Expand Down

0 comments on commit d23c260

Please sign in to comment.