Skip to content

Commit

Permalink
Fix HyperlinkedRelatedField.get_object() argument types
Browse files Browse the repository at this point in the history
Upstream typehints this method as `def get_object(self, view_name, view_args, view_kwargs)`
  • Loading branch information
intgr committed Apr 23, 2024
1 parent ffb1504 commit dfac20c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_framework-stubs/relations.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class HyperlinkedRelatedField(RelatedField[_MT, str, Hyperlink]):
lookup_url_kwarg: str | None = ...,
format: str | None = ...,
) -> None: ...
def get_object(self, view_name: str, *view_args: Any, **view_kwargs: Any) -> _MT: ...
def get_object(self, view_name: str, view_args: list[Any], view_kwargs: dict[str, Any]) -> _MT: ...
def get_url(self, obj: Model, view_name: str, request: Request, format: str | None) -> str | None: ...

class HyperlinkedIdentityField(HyperlinkedRelatedField): ...
Expand Down

0 comments on commit dfac20c

Please sign in to comment.