Skip to content

Commit

Permalink
Update get_minimum_required_python.py (shorthills-ai#12)
Browse files Browse the repository at this point in the history
* Update main.py

Signed-off-by: Adarsh Shrivastav <[email protected]>

* Update get_minimum_required_python.py

Signed-off-by: Adarsh Shrivastav <[email protected]>

---------

Signed-off-by: Adarsh Shrivastav <[email protected]>
  • Loading branch information
AdarshKumarShorthillsAI authored Oct 26, 2023
1 parent 779451b commit c5ed817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dev/get_minimum_required_python.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
python dev/get_minimum_required_python.py -p scikit-learn -v 1.1.0 --python-versions "3.8"
"""
import argparse
import typing as t
from typing import Optional

import requests
from packaging.specifiers import SpecifierSet
from packaging.version import Version


def get_requires_python(package: str, version: str) -> t.Optional[str]:
def get_requires_python(package: str, version: str) -> Optional[str]:
resp = requests.get(f"https://pypi.python.org/pypi/{package}/json")
resp.raise_for_status()
return next(
Expand Down

0 comments on commit c5ed817

Please sign in to comment.