Skip to content

Commit

Permalink
None check instead of "or"
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering committed Feb 28, 2022
1 parent 644710c commit d1dbddb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/poetry/mixology/version_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ def _get_min(dependency: Dependency) -> tuple[bool, int]:
if version.version != locked.version:
version = None
break
with suppress(IndexError):
version = version or packages[0]
if version is None:
with suppress(IndexError):
version = packages[0]

if version is None:
# If there are no versions that satisfy the constraint,
Expand Down

0 comments on commit d1dbddb

Please sign in to comment.