Bump click from 7.1.2 to 8.0.1 (#95)

* Bump click from 7.1.2 to 8.0.1

Bumps [click](https://github.com/pallets/click) from 7.1.2 to 8.0.1.
- [Release notes](https://github.com/pallets/click/releases)
- [Changelog](https://github.com/pallets/click/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/click/compare/7.1.2...8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

* Get version using importlib.metdata

* Conditionally import metadata

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dave Gallant <dave.gallant@rewind.io>
This commit is contained in:
dependabot[bot]
2021-07-11 09:27:36 -04:00
committed by GitHub
parent f73fdc71b6
commit 460ea6eef0
6 changed files with 20 additions and 26 deletions

View File

@@ -1 +0,0 @@
rfd/VERSION

18
poetry.lock generated
View File

@@ -94,11 +94,15 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
[[package]]
name = "click"
version = "7.1.2"
version = "8.0.1"
description = "Composable command line interface toolkit"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
python-versions = ">=3.6"
[package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""}
importlib-metadata = {version = "*", markers = "python_version < \"3.8\""}
[[package]]
name = "colorama"
@@ -147,7 +151,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
name = "importlib-metadata"
version = "4.0.1"
description = "Read metadata from Python packages"
category = "dev"
category = "main"
optional = false
python-versions = ">=3.6"
@@ -390,7 +394,7 @@ python-versions = "*"
name = "typing-extensions"
version = "3.10.0.0"
description = "Backported and Experimental Type Hints for Python 3.5+"
category = "dev"
category = "main"
optional = false
python-versions = "*"
@@ -439,7 +443,7 @@ python-versions = "*"
name = "zipp"
version = "3.4.1"
description = "Backport of pathlib-compatible object wrapper for zip files"
category = "dev"
category = "main"
optional = false
python-versions = ">=3.6"
@@ -491,8 +495,8 @@ chardet = [
{file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"},
]
click = [
{file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"},
{file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"},
{file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"},
{file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"},
]
colorama = [
{file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"},

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "rfd"
version = "0.7.1"
version = "0.7.2"
description = "view RedFlagDeals.com from the command line"
authors = ["Dave Gallant <davegallant@gmail.com>"]
license = "GPL-3.0-or-later"

View File

@@ -1 +0,0 @@
0.7.1

View File

@@ -1,12 +0,0 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from os.path import dirname, abspath, join
def load_version():
with open(join(dirname(abspath(__file__)), "VERSION")) as handle:
return handle.read()
version = load_version()

View File

@@ -4,11 +4,15 @@ from __future__ import unicode_literals
import logging
import sys
import click
try:
from importlib import metadata
except ImportError: # for Python<3.8
import importlib_metadata as metadata
from colorama import init
from .api import get_threads, get_posts
from .threads import parse_threads, search_threads, sort_threads, generate_thread_output
from .posts import generate_posts_output
from .__version__ import version as current_version
init()
@@ -18,12 +22,12 @@ logging.getLogger().addHandler(logging.StreamHandler())
def get_version():
return "rfd v" + current_version
return "rfd v" + metadata.version("rfd")
def print_version(ctx, value):
def print_version(ctx, _, value):
if not value or ctx.resilient_parsing:
return
click.echo(get_version(), nl=False)
click.echo(get_version(), nl=True)
ctx.exit()