Skip to content

Commit

Permalink
Improvement according to C409 flake8 comprehension rule
Browse files Browse the repository at this point in the history
C409 Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal).
  • Loading branch information
David Read committed Nov 8, 2019
1 parent 9a13a4b commit 44cf609
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckan/tests/helpers.py
Expand Up @@ -457,7 +457,7 @@ def wrapper(*args, **kwargs):
try:
with mock.patch(auth_function_path) as mocked_auth:
clear_auth_functions_cache()
new_args = args + tuple([mocked_auth])
new_args = args + (mocked_auth,)
return_value = func(*new_args, **kwargs)
finally:
clear_auth_functions_cache()
Expand Down Expand Up @@ -513,7 +513,7 @@ def side_effect(called_action_name):
mock_get_action.side_effect = side_effect
mock_get_action_toolkit.side_effect = side_effect

new_args = args + tuple([mock_action])
new_args = args + (mock_action,)
return_value = func(*new_args, **kwargs)
finally:
# Make sure to stop the mock, even with an exception
Expand Down

0 comments on commit 44cf609

Please sign in to comment.