From 19aac9a0094805b69a5e7d37a6ba09d28b91a0f4 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 3 May 2021 18:06:02 +0400 Subject: [PATCH 1/3] Update black from 20.8b1 to 21.4b2 --- requirements/requirements-codestyle.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-codestyle.txt b/requirements/requirements-codestyle.txt index d572c8ea..8395b9e1 100644 --- a/requirements/requirements-codestyle.txt +++ b/requirements/requirements-codestyle.txt @@ -1,4 +1,4 @@ -black==20.8b1 +black==21.4b2 flake8==3.9.1 flake8-isort==4.0.0 isort==5.8.0 From 766d15833b53d9fe6c0200d1b4300d92be6a41dc Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 3 May 2021 18:06:03 +0400 Subject: [PATCH 2/3] Update faker from 8.1.0 to 8.1.2 --- requirements/requirements-testing.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index e8c83a71..7887a137 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -1,6 +1,6 @@ django-debug-toolbar==3.2.1 factory-boy==3.2.0 -Faker==8.1.0 +Faker==8.1.2 pytest==6.2.3 pytest-cov==2.11.1 pytest-django==4.2.0 From d5a4750da7d611e7c69d08b367478fc82f3fa271 Mon Sep 17 00:00:00 2001 From: Oliver Sauder Date: Tue, 4 May 2021 21:43:11 +0400 Subject: [PATCH 3/3] Reformat code with black --- rest_framework_json_api/utils.py | 2 +- rest_framework_json_api/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework_json_api/utils.py b/rest_framework_json_api/utils.py index f8c6833c..ac31979a 100644 --- a/rest_framework_json_api/utils.py +++ b/rest_framework_json_api/utils.py @@ -326,7 +326,7 @@ def get_resource_type_from_serializer(serializer): def get_included_resources(request, serializer=None): - """ Build a list of included resources. """ + """Build a list of included resources.""" include_resources_param = request.query_params.get("include") if request else None if include_resources_param: return include_resources_param.split(",") diff --git a/rest_framework_json_api/views.py b/rest_framework_json_api/views.py index 8369cec9..e457009b 100644 --- a/rest_framework_json_api/views.py +++ b/rest_framework_json_api/views.py @@ -81,7 +81,7 @@ def get_queryset(self, *args, **kwargs): class AutoPrefetchMixin(object): def get_queryset(self, *args, **kwargs): - """ This mixin adds automatic prefetching for OneToOne and ManyToMany fields. """ + """This mixin adds automatic prefetching for OneToOne and ManyToMany fields.""" qs = super(AutoPrefetchMixin, self).get_queryset(*args, **kwargs) included_resources = get_included_resources(