From 2bc47d7fe95ec9fc62bc5c0d2408944e5269d9d0 Mon Sep 17 00:00:00 2001 From: Nick Pope Date: Fri, 28 Oct 2022 14:51:34 +0100 Subject: Avoided assignment followed by immediate return. Identified using the following command: $ pcre2grep --line-number --multiline --recursive \ "(?s)(\n +)(\w+) = [^\n]+\1return \2;?$" \ django docs extras js_tests scripts tests --- tests/test_runner/tests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests/test_runner') diff --git a/tests/test_runner/tests.py b/tests/test_runner/tests.py index 30ea4ea670..c4946c3e58 100644 --- a/tests/test_runner/tests.py +++ b/tests/test_runner/tests.py @@ -156,8 +156,7 @@ class TestSuiteTests(SimpleTestCase): def make_tests(self): """Return an iterable of tests.""" suite = self.make_test_suite() - tests = list(iter_test_cases(suite)) - return tests + return list(iter_test_cases(suite)) def test_shuffle_tests(self): tests = self.make_tests() -- cgit v1.3