diff --git a/src/osmg/get_latest_pypi_version.py b/src/osmg/get_latest_pypi_version.py index 0c0191f3..c7e01953 100644 --- a/src/osmg/get_latest_pypi_version.py +++ b/src/osmg/get_latest_pypi_version.py @@ -3,18 +3,18 @@ def get_latest_version(package_name): url = f"https://pypi.org/pypi/{package_name}/json" - + try: response = requests.get(url) package_info = response.json() - latest_version = package_info['info']['version'] + latest_version = package_info["info"]["version"] return latest_version except Exception as e: print(f"An error occurred: {e}") return None -if __name__ == '__main__': - package = 'osmg' +if __name__ == "__main__": + package = "osmg" version = get_latest_version(package) print(version)