Skip to content

Commit a1bb454

Browse files
committed
remove redundant conditional
1 parent 2815f55 commit a1bb454

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

submit50/__main__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def check_announcements():
6161

6262

6363
def 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

0 commit comments

Comments
 (0)