Skip to content

Commit

Permalink
Correct formatting for black
Browse files Browse the repository at this point in the history
  • Loading branch information
philipstarkey committed Mar 8, 2024
1 parent cb83d93 commit 90c3b33
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions tests/serializers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A collection of complete extensions serializers to be used by various tests.
"""

from rest_framework import serializers

from rest_framework_serializer_extensions.serializers import (
Expand Down
8 changes: 5 additions & 3 deletions tests/test_serializers__expandable_fields_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class Meta:
expandable_fields = dict(
manufacturer=ManufacturerTestSerializer,
skus=dict(
serializer="{0}.SkuTestSerializer".format(MODULE), many=True
serializer="{0}.SkuTestSerializer".format(MODULE),
many=True,
),
)

Expand All @@ -49,7 +50,8 @@ class Meta:
expandable_fields = dict(
model=CarModelTestSerializer,
owners=dict(
serializer="{0}.OwnerTestSerializer".format(MODULE), many=True,
serializer="{0}.OwnerTestSerializer".format(MODULE),
many=True,
),
)

Expand Down Expand Up @@ -434,7 +436,7 @@ def test_method_field_serializer_unexpanded(self):
"""
self.assertDictEqual(
OwnerWithMethodFieldTestSerializer(self.owner_tyrell).data,
dict(id=self.owner_tyrell.pk, name=self.owner_tyrell.name,),
dict(id=self.owner_tyrell.pk, name=self.owner_tyrell.name),
)

def test_method_field_serializer_expanded(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_serializers__only_fields_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def test_complex(self):
),
dict(
name=self.carmodel_model_s.name,
manufacturer=dict(name=self.manufacturer_tesla.name,),
manufacturer=dict(name=self.manufacturer_tesla.name),
skus=[
dict(variant=self.sku_p100d.variant),
dict(variant=self.sku_70.variant),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def get_extensions_query_params_enabled(self):
)

@patch.object(
SerializerExtensionsAPIViewMixin, "get_extensions_auto_optimize",
SerializerExtensionsAPIViewMixin, "get_extensions_auto_optimize"
)
def test_auto_optimization_included(self, mock_get_auto_optimize):
"""
Expand Down
1 change: 1 addition & 0 deletions tests/views.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
A collection of complete extensions views to be used by various tests.
"""

from rest_framework.generics import ListAPIView, RetrieveAPIView

from rest_framework_serializer_extensions.views import (
Expand Down
4 changes: 1 addition & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ deps =
extras = test

[testenv:black]
# Run black check, output diff, and ignore trailing commas (don't always force over
# multiple lines)
commands = black rest_framework_serializer_extensions tests --check --diff -C
commands = black rest_framework_serializer_extensions tests --check --diff
skip_install = true
deps =
-crequirements-dev.txt
Expand Down

0 comments on commit 90c3b33

Please sign in to comment.