Skip to content

Commit

Permalink
fix: Use latest_version from pip list --outdated
Browse files Browse the repository at this point in the history
  • Loading branch information
achillesrasquinha committed Feb 8, 2019
1 parent 9f04be2 commit f06f71b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pipupgrade/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ def __init__(self, package):
elif isinstance(package, dict):
self.name = package["name"]
self.current_version = package["version"]
self.latest_version = package.get("version")

_pypi_info = _get_pypi_info(self.name, raise_err = False) or { }

self.latest_version = _pypi_info.get("version")

if not self.latest_version:
self.latest_version = _pypi_info.get("version")

self.home_page = _pypi_info.get("home_page")

def _update_requirements(path, package):
Expand Down

0 comments on commit f06f71b

Please sign in to comment.