From 44cf609e7e0455fd234e9199f1d38a129ec1ee05 Mon Sep 17 00:00:00 2001 From: David Read Date: Fri, 8 Nov 2019 21:42:03 +0000 Subject: [PATCH] Improvement according to C409 flake8 comprehension rule C409 Unnecessary (list/tuple) passed to tuple() - (remove the outer call to tuple()/rewrite as a tuple literal). --- ckan/tests/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckan/tests/helpers.py b/ckan/tests/helpers.py index ca35f7460ce..2302674a9c1 100644 --- a/ckan/tests/helpers.py +++ b/ckan/tests/helpers.py @@ -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() @@ -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