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: ...@@ -23,7 +23,7 @@ class Incompatibility:
if ( if (
len(terms) != 1 len(terms) != 1
and isinstance(cause, ConflictCause) 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 = [ terms = [
term term
......
...@@ -403,11 +403,9 @@ class VersionSolver: ...@@ -403,11 +403,9 @@ class VersionSolver:
# We'll continue adding its dependencies, then go back to # We'll continue adding its dependencies, then go back to
# unit propagation which will guide us to choose a better version. # unit propagation which will guide us to choose a better version.
conflict = conflict or all( conflict = conflict or all(
[ term.dependency.complete_name == dependency.complete_name
term.dependency.complete_name == dependency.complete_name or self._solution.satisfies(term)
or self._solution.satisfies(term) for term in incompatibility.terms
for term in incompatibility.terms
]
) )
if not conflict: if not conflict:
......
...@@ -101,11 +101,9 @@ class KeyRing: ...@@ -101,11 +101,9 @@ class KeyRing:
backends = keyring.backend.get_all_keyring() backends = keyring.backend.get_all_keyring()
self._is_available = any( self._is_available = any(
[ b.name.split(" ")[0] not in ["chainer", "fail"]
b.name.split(" ")[0] not in ["chainer", "fail"] and "plaintext" not in b.name.lower()
and "plaintext" not in b.name.lower() for b in backends
for b in backends
]
) )
except Exception: except Exception:
self._is_available = False 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