Skip to content

Commit

Permalink
Fix flake8 issues
Browse files Browse the repository at this point in the history
Signed-off-by: Stefano Bennati <stefano.bennati@here.com>
  • Loading branch information
bennati committed Jan 12, 2023
1 parent b66a6ff commit 0fa102a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/resolvelib/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,10 @@ def _backjump(self, causes):
Each iteration of the loop will:
1. Identify Z. The incompatibility is not necessarily caused by the latest state.
1. Identify Z. The incompatibility is not always caused by the latest state.
For example, given three requirements A, B and C, with dependencies
A1, B1 and C1, where A1 and B1 are incompatible:
the last state might be related to C, so we want to discard the previous state.
A1, B1 and C1, where A1 and B1 are incompatible: the last state
might be related to C, so we want to discard the previous state.
2. Discard Z.
3. Discard Y but remember its incompatibility information gathered
previously, and the failure we're dealing with right now.
Expand All @@ -310,9 +310,10 @@ def _backjump(self, causes):
# Retrieve the last candidate pin and known incompatibilities.
try:
broken_state = self._states.pop()
except:
except IndexError:
raise Exception(
"Exhausted all states during backjumping, impossible to find a fully-compatible dependency tree."
"Exhausted all states during backjumping, "
"impossible to find a fully-compatible dependency tree."
)
name, candidate = broken_state.mapping.popitem()
current_dependencies = {
Expand Down

0 comments on commit 0fa102a

Please sign in to comment.