Skip to content

Commit

Permalink
fix: a few ModelSerializer members missing type[] (#51)
Browse files Browse the repository at this point in the history
the members are types and not instances
  • Loading branch information
agalasso authored Sep 22, 2024
1 parent 04cb561 commit bd865b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rest_framework-stubs/serializers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ class ListSerializer(BaseSerializer):
def raise_errors_on_nested_writes(method_name: str, serializer: BaseSerializer, validated_data: Any) -> NoReturn: ...

class ModelSerializer(Serializer, BaseSerializer):
serializer_field_mapping: dict[type[models.Field[Any, Any]], Field[Any, Any, Any, Any]] = ...
serializer_related_field: RelatedField = ...
serializer_related_to_field: RelatedField = ...
serializer_url_field: RelatedField = ...
serializer_choice_field: Field[Any, Any, Any, Any] = ...
serializer_field_mapping: dict[type[models.Field[Any, Any]], type[Field[Any, Any, Any, Any]]] = ...
serializer_related_field: type[RelatedField] = ...
serializer_related_to_field: type[RelatedField] = ...
serializer_url_field: type[RelatedField] = ...
serializer_choice_field: type[Field[Any, Any, Any, Any]] = ...
url_field_name: str | None = ...
instance: Any

Expand Down

0 comments on commit bd865b5

Please sign in to comment.