]> khamidou — GitHub mirrors - vcrpy.git/commitdiff
Replace unnecessary list comprehension - 'all' can take a generator
authorHugo <hugovk@users.noreply.github.com>
Thu, 7 Dec 2017 11:37:33 +0000 (13:37 +0200)
committerHugo <hugovk@users.noreply.github.com>
Mon, 15 Jan 2018 07:54:11 +0000 (09:54 +0200)
vcr/matchers.py

index f2029a87df957607649ea3e5e673028417d5dd44..ad04a4569e6ca13d273452e11e1f486bb4ce8dbf 100644 (file)
@@ -98,4 +98,4 @@ def _log_matches(r1, r2, matches):
 def requests_match(r1, r2, matchers):
     matches = [(m(r1, r2), m) for m in matchers]
     _log_matches(r1, r2, matches)
-    return all([m[0] for m in matches])
+    return all(m[0] for m in matches)