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 c3bbb0a commit 708b3b5
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 8 deletions.
1 change: 0 additions & 1 deletion codeforlife/models/signals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@
https://docs.djangoproject.com/en/3.2/ref/signals/#module-django.db.models.signals
"""


from .general import UpdateFields, update_fields_includes
from .receiver import model_receiver
1 change: 1 addition & 0 deletions codeforlife/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
cfl_settings.EXAMPLE_SETTING
`
"""

from .custom import *
from .django import *
from .third_party import *
1 change: 1 addition & 0 deletions codeforlife/settings/custom.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This file contains all of our custom settings we define for our own purposes.
"""

import os

# The name of the current service.
Expand Down
1 change: 1 addition & 0 deletions codeforlife/settings/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This file contains all the settings Django supports out of the box.
https://docs.djangoproject.com/en/3.2/ref/settings/
"""

import os
from pathlib import Path

Expand Down
1 change: 1 addition & 0 deletions codeforlife/settings/third_party.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This file contains custom settings defined by third party extensions.
"""

from .django import DEBUG

# CORS
Expand Down
6 changes: 3 additions & 3 deletions codeforlife/tests/model_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,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
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
© Ocado Group
Created on 30/01/2024 at 12:36:00(+00:00).
"""

from ....tests import TestCase
from ...models import User
from .independent import IndependentPasswordValidator
Expand Down
1 change: 1 addition & 0 deletions codeforlife/user/auth/password_validators/student_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
© Ocado Group
Created on 30/01/2024 at 12:36:00(+00:00).
"""

from ....tests import TestCase
from ...models import User
from .student import StudentPasswordValidator
Expand Down
1 change: 1 addition & 0 deletions codeforlife/user/auth/password_validators/teacher_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
© Ocado Group
Created on 30/01/2024 at 12:36:00(+00:00).
"""

from ....tests import TestCase
from ...models import User
from .teacher import TeacherPasswordValidator
Expand Down
1 change: 1 addition & 0 deletions codeforlife/user/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
© Ocado Group
Created on 05/02/2024 at 13:48:55(+00:00).
"""

from .auth_factor import AuthFactor
from .klass import Class
from .otp_bypass_token import OtpBypassToken
Expand Down
1 change: 0 additions & 1 deletion codeforlife/user/views/school_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Created on 20/01/2024 at 09:47:30(+00:00).
"""


from ...permissions import OR, AllowNone
from ...tests import ModelViewSetTestCase
from ..models import School, SchoolTeacherUser, StudentUser, User
Expand Down

0 comments on commit 708b3b5

Please sign in to comment.