Skip to content

Commit

Permalink
Merge pull request #126 from sarugaku/fix-
Browse files Browse the repository at this point in the history
fix: use the protocol method instead of .name attribute
  • Loading branch information
pradyunsg authored Mar 8, 2023
2 parents 02fb736 + 5ede4c4 commit e8fecf7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/resolvelib/resolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,9 @@ def _backjump(self, causes):
the new Z and go back to step 2.
5b. If the incompatibilities apply cleanly, end backtracking.
"""
incompatible_deps = set(
[c.parent.name for c in causes if c.parent is not None]
+ [c.requirement.name for c in causes]
)
incompatible_deps = {
self._p.identify(c.parent) for c in causes if c.parent is not None
} | {self._p.identify(c.requirement) for c in causes}
while len(self._states) >= 3:
# Remove the state that triggered backtracking.
del self._states[-1]
Expand Down

0 comments on commit e8fecf7

Please sign in to comment.