From 011c25457996c8239783c5c4690c4a450af4e2cb Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Thu, 20 Apr 2023 13:07:46 +0200 Subject: [PATCH] Remove unnecessary list comprehension. --- benedict/dicts/io/io_util.py | 2 +- tests/core/test_unique.py | 2 +- tests/dicts/test_benedict.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benedict/dicts/io/io_util.py b/benedict/dicts/io/io_util.py index a46c08d..038ae47 100644 --- a/benedict/dicts/io/io_util.py +++ b/benedict/dicts/io/io_util.py @@ -71,7 +71,7 @@ def is_s3(s): def is_url(s): - return any([s.startswith(protocol) for protocol in ["http://", "https://"]]) + return any(s.startswith(protocol) for protocol in ["http://", "https://"]) def parse_s3_url(url): diff --git a/tests/core/test_unique.py b/tests/core/test_unique.py index 683bfa1..0587bbf 100644 --- a/tests/core/test_unique.py +++ b/tests/core/test_unique.py @@ -55,4 +55,4 @@ class unique_test_case(unittest.TestCase): }, ] self.assertEqual(len(d.keys()), len(rv)) - self.assertTrue(all([value in rv for value in d.values()])) + self.assertTrue(all(value in rv for value in d.values())) diff --git a/tests/dicts/test_benedict.py b/tests/dicts/test_benedict.py index 7ee392d..2dac072 100644 --- a/tests/dicts/test_benedict.py +++ b/tests/dicts/test_benedict.py @@ -2242,4 +2242,4 @@ b: }, ] self.assertEqual(len(b.keys()), len(rv)) - self.assertTrue(all([value in rv for value in b.values()])) + self.assertTrue(all(value in rv for value in b.values()))