From 2bef97cb526c2aa96e9ed8d3b3af8cdf11796063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20HUBSCHER?= Date: Thu, 2 Feb 2017 17:45:14 +0100 Subject: [PATCH] Fix flake8 errors. --- kinto/core/authentication.py | 4 +--- kinto/core/resource/model.py | 6 +----- kinto/core/resource/viewset.py | 4 +--- tests/core/resource/test_events.py | 3 +-- tests/test_views_flush.py | 3 +-- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/kinto/core/authentication.py b/kinto/core/authentication.py index 2d9b17c53..58bee851b 100644 --- a/kinto/core/authentication.py +++ b/kinto/core/authentication.py @@ -13,9 +13,7 @@ class BasicAuthAuthenticationPolicy(base_auth.BasicAuthAuthenticationPolicy): def __init__(self, *args, **kwargs): def noop_check(*a): return [] - super().__init__(noop_check, - *args, - **kwargs) + super().__init__(noop_check, *args, **kwargs) def effective_principals(self, request): # Bypass default Pyramid construction of principals because diff --git a/kinto/core/resource/model.py b/kinto/core/resource/model.py index 0a3e655b6..59c1ee9ee 100644 --- a/kinto/core/resource/model.py +++ b/kinto/core/resource/model.py @@ -288,11 +288,7 @@ def delete_records(self, filters=None, sorting=None, pagination_rules=None, limit=None, parent_id=None): """Delete permissions when collection records are deleted in bulk. """ - deleted = super().delete_records(filters, - sorting, - pagination_rules, - limit, - parent_id) + deleted = super().delete_records(filters, sorting, pagination_rules, limit, parent_id) # Take a huge shortcut in case we want to delete everything. if not filters: perm_ids = [self.get_permission_object_id(object_id='*')] diff --git a/kinto/core/resource/viewset.py b/kinto/core/resource/viewset.py index 78c4e7008..6d463881c 100644 --- a/kinto/core/resource/viewset.py +++ b/kinto/core/resource/viewset.py @@ -231,9 +231,7 @@ def get_record_schema(self, resource_cls, method): return record_schema def get_view_arguments(self, endpoint_type, resource_cls, method): - args = super().get_view_arguments(endpoint_type, - resource_cls, - method) + args = super().get_view_arguments(endpoint_type, resource_cls, method) args['permission'] = authorization.DYNAMIC return args diff --git a/tests/core/resource/test_events.py b/tests/core/resource/test_events.py index 01050eba1..eb243ec60 100644 --- a/tests/core/resource/test_events.py +++ b/tests/core/resource/test_events.py @@ -49,8 +49,7 @@ def make_app(self, settings=None, config=None): for event_cls in self.subscribed: config.add_subscriber(self.listener, event_cls) config.commit() - return super().make_app(settings=settings, - config=config) + return super().make_app(settings=settings, config=config) class ResourceReadTest(BaseEventTest, unittest.TestCase): diff --git a/tests/test_views_flush.py b/tests/test_views_flush.py index 09cfbd289..b0927b400 100644 --- a/tests/test_views_flush.py +++ b/tests/test_views_flush.py @@ -54,8 +54,7 @@ def make_app(self, settings=None, config=None): config = Configurator(settings=settings) config.add_subscriber(self.listener, ServerFlushed) config.commit() - return super().make_app(settings=settings, - config=config) + return super().make_app(settings=settings, config=config) def get_app_settings(self, extras=None): if extras is None: