From fac8ea78def6cc2777fa6e27b26b374046621a40 Mon Sep 17 00:00:00 2001 From: Gil Forcada Date: Thu, 16 Apr 2020 14:25:32 +0200 Subject: [PATCH] fix: a list comprehension is always a list Reported by @Zac-HD https://github.com/gforcada/flake8-builtins/pull/46#discussion_r405291970 --- run_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index 79a05a5..3ee8091 100644 --- a/run_tests.py +++ b/run_tests.py @@ -579,4 +579,5 @@ def test_builtin_works_on_many_examples(source_code): raise tree = ast.parse(source) checker = BuiltinsChecker(tree, '/home/script.py') - assert isinstance([c for c in checker.run()], list) + for c in checker.run(): + assert isinstance(c, list)