Commit e35f0819 by Rayan Das Committed by Steph Samson

the built-in function being used does not require comprehension and can work…

the built-in function being used does not require comprehension and can work directly with a generator expression

Signed-off-by: Rayan Das <rayandas91@gmail.com>
parent f5f6efca
......@@ -23,7 +23,7 @@ class Incompatibility:
if (
len(terms) != 1
and isinstance(cause, ConflictCause)
and any([term.is_positive() and term.dependency.is_root for term in terms])
and any(term.is_positive() and term.dependency.is_root for term in terms)
):
terms = [
term
......
......@@ -403,11 +403,9 @@ class VersionSolver:
# We'll continue adding its dependencies, then go back to
# unit propagation which will guide us to choose a better version.
conflict = conflict or all(
[
term.dependency.complete_name == dependency.complete_name
or self._solution.satisfies(term)
for term in incompatibility.terms
]
term.dependency.complete_name == dependency.complete_name
or self._solution.satisfies(term)
for term in incompatibility.terms
)
if not conflict:
......
......@@ -101,11 +101,9 @@ class KeyRing:
backends = keyring.backend.get_all_keyring()
self._is_available = any(
[
b.name.split(" ")[0] not in ["chainer", "fail"]
and "plaintext" not in b.name.lower()
for b in backends
]
b.name.split(" ")[0] not in ["chainer", "fail"]
and "plaintext" not in b.name.lower()
for b in backends
)
except Exception:
self._is_available = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment