Skip to content

Commit

Permalink
Black
Browse files Browse the repository at this point in the history
  • Loading branch information
faucomte97 committed Sep 18, 2024
1 parent 2e947de commit b9a9f70
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions codeforlife/tests/model_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from unittest.case import _AssertRaisesContext

from django.db.models import Model
from django.forms.models import model_to_dict
from rest_framework.serializers import BaseSerializer, ValidationError

from ..serializers import ModelListSerializer, ModelSerializer
Expand Down Expand Up @@ -151,9 +150,9 @@ def _assert_many(
assert len(new_data) == len(validated_data)

kwargs.pop("many", None) # many must be True
serializer: ModelListSerializer[
RequestUser, AnyModel
] = self._init_model_serializer(*args, **kwargs, many=True)
serializer: ModelListSerializer[RequestUser, AnyModel] = (
self._init_model_serializer(*args, **kwargs, many=True)
)

models = get_models(serializer, deepcopy(validated_data))
assert len(models) == len(validated_data)
Expand Down
6 changes: 3 additions & 3 deletions codeforlife/tests/model_view_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,9 +614,9 @@ class ModelViewSetTestCase(
basename: str
model_view_set_class: t.Type[ModelViewSet[RequestUser, AnyModel]]
client: ModelViewSetClient[RequestUser, AnyModel]
client_class: t.Type[
ModelViewSetClient[RequestUser, AnyModel]
] = ModelViewSetClient
client_class: t.Type[ModelViewSetClient[RequestUser, AnyModel]] = (
ModelViewSetClient
)

@classmethod
def get_model_class(cls) -> t.Type[AnyModel]:
Expand Down

0 comments on commit b9a9f70

Please sign in to comment.