File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ def check_announcements():
6161
6262
6363def check_version (package_name = __package__ , timeout = 30 ):
64- """Check that submit50 is the latest version according to submit50.io."""
64+ """Check that submit50 is the latest version according to submit50.io and PyPI ."""
6565 if not __version__ :
6666 return
6767
@@ -75,7 +75,7 @@ def check_version(package_name=__package__, timeout=30):
7575 latest_io = version .parse (res .text .strip ())
7676 current = version .parse (__version__ )
7777
78- # Get PyPi version
78+ # Get PyPI version
7979 latest_pypi = max (
8080 requests .get (f"https://pypi.org/pypi/{ package_name } /json" , timeout = timeout ).json ()["releases" ],
8181 key = version .parse
@@ -87,7 +87,7 @@ def check_version(package_name=__package__, timeout=30):
8787 raise Error (_ (f"v{ current } of { package_name } is no longer supported. Run pip3 install --upgrade { package_name } to upgrade." ))
8888
8989 # Check for latest version
90- if latest_pypi > current or latest_io > current :
90+ if latest_pypi > current :
9191 cprint (f"A newer version of { package_name } is available. Run pip3 install --upgrade { package_name } to upgrade." , "magenta" )
9292
9393
You can’t perform that action at this time.
0 commit comments