Skip to content

Commit

Permalink
Fix flake8 errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy HUBSCHER committed Feb 3, 2017
1 parent 97180fa commit 2bef97c
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 15 deletions.
4 changes: 1 addition & 3 deletions kinto/core/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions kinto/core/resource/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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='*')]
Expand Down
4 changes: 1 addition & 3 deletions kinto/core/resource/viewset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions tests/core/resource/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions tests/test_views_flush.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2bef97c

Please sign in to comment.