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 Nov 21, 2021
1 parent 873c20e commit c4b54b1
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 @@ -387,8 +387,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 c4b54b1

Please sign in to comment.