Total Complexity | 1 |
Total Lines | 13 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """Script to check for available MetaStalk updates""" |
||
2 | |||
3 | from distutils.version import LooseVersion |
||
4 | import requests |
||
5 | |||
6 | |||
7 | def check_update(current_version: str) -> bool: |
||
8 | """Check version against pypi.org information""" |
||
9 | latest = LooseVersion( |
||
10 | requests.get("https://pypi.org/pypi/MetaStalk/json").json()["info"]["version"] |
||
11 | ) |
||
12 | return latest > current_version |
||
13 |