Remove unnecessary list comprehension.

This commit is contained in:
Fabio Caccamo 2023-04-20 13:07:46 +02:00
parent 8f3be21dbe
commit 011c254579
3 changed files with 3 additions and 3 deletions

View File

@ -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):

View File

@ -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()))

View File

@ -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()))