Skip to content

Commit

Permalink
Remove packaging dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
nathom committed May 14, 2021
1 parent e74a7da commit 7215331
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ ignore_missing_imports = True

[mypy-simple_term_menu.*]
ignore_missing_imports = True

[mypy-setuptools.*]
ignore_missing_imports = True
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
click
ruamel.yaml
packaging
pathvalidate
requests
mutagen
Expand Down
11 changes: 3 additions & 8 deletions streamrip/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
import click
import requests

from . import __version__
from .clients import TidalClient
from .config import Config
from .constants import CACHE_DIR, CONFIG_DIR, CONFIG_PATH, QOBUZ_FEATURED_KEYS
from .core import MusicDL
from .utils import init_log


logging.basicConfig(level="WARNING")
logger = logging.getLogger("streamrip")
Expand Down Expand Up @@ -69,15 +70,9 @@ def cli(ctx, **kwargs):
return

if config.session["check_for_updates"]:
from importlib import metadata

from packaging import version

r = requests.get("https://pypi.org/pypi/streamrip/json").json()
newest = r["info"]["version"]
if version.parse(metadata.version("streamrip")) < version.parse(
newest
):
if __version__ != newest:
click.secho(
"A new version of streamrip is available! "
"Run `pip3 install streamrip --upgrade` to update.",
Expand Down

0 comments on commit 7215331

Please sign in to comment.