From 495b293ac6a556f68e6547b0328885f1b5217a18 Mon Sep 17 00:00:00 2001 From: Thomas Ilsche Date: Thu, 1 Jun 2023 12:24:21 +0200 Subject: [PATCH] fix: remove click_completion Shell completion is now supported by click itself and the extra package is dead. https://github.com/click-contrib/click-completion/issues/37 https://github.com/click-contrib/click-completion/issues/41 It is still not trivial to use because it needs to be enabled for the shell. And maybe is and always was impossible for these example .py files because they are not real commands anyway. https://click.palletsprojects.com/en/8.1.x/shell-completion/ --- metricq_tools/check.py | 2 -- metricq_tools/discover.py | 3 --- metricq_tools/inspect.py | 3 --- metricq_tools/send.py | 3 --- metricq_tools/spy.py | 3 --- metricq_tools/summary.py | 3 --- setup.cfg | 1 - 7 files changed, 18 deletions(-) diff --git a/metricq_tools/check.py b/metricq_tools/check.py index b4024f2..65ff883 100644 --- a/metricq_tools/check.py +++ b/metricq_tools/check.py @@ -2,7 +2,6 @@ import math import click -import click_completion import click_log import metricq @@ -12,7 +11,6 @@ logger = get_root_logger() -click_completion.init() async def check_for_non_finite(client): diff --git a/metricq_tools/discover.py b/metricq_tools/discover.py index 8c120a7..c1b9f3d 100755 --- a/metricq_tools/discover.py +++ b/metricq_tools/discover.py @@ -39,7 +39,6 @@ import aio_pika import async_timeout import click -import click_completion import click_log import humanize import metricq @@ -60,8 +59,6 @@ logger = get_root_logger() -click_completion.init() - class IgnoredEvent(CommandLineChoice, Enum): ErrorResponses = enum_auto() diff --git a/metricq_tools/inspect.py b/metricq_tools/inspect.py index c7647b4..34422ec 100755 --- a/metricq_tools/inspect.py +++ b/metricq_tools/inspect.py @@ -31,7 +31,6 @@ import aio_pika import click -import click_completion import click_log import metricq import numpy as np @@ -45,8 +44,6 @@ logger = get_root_logger() -click_completion.init() - class InspectSink(metricq.Sink): def __init__( diff --git a/metricq_tools/send.py b/metricq_tools/send.py index 92fc7a9..b88846c 100755 --- a/metricq_tools/send.py +++ b/metricq_tools/send.py @@ -28,7 +28,6 @@ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import click -import click_completion import click_log from metricq import Source, Timestamp from metricq.types import Metric @@ -40,8 +39,6 @@ logger = get_root_logger() -click_completion.init() - class MetricQSend(Source): def __init__(self, metric, timestamp, value, *args, **kwargs): diff --git a/metricq_tools/spy.py b/metricq_tools/spy.py index 8ccf4e8..bc48f5e 100755 --- a/metricq_tools/spy.py +++ b/metricq_tools/spy.py @@ -33,7 +33,6 @@ import aio_pika import click -import click_completion import click_log import metricq from metricq.types import Metric @@ -44,8 +43,6 @@ logger = get_root_logger() -click_completion.init() - Database = str diff --git a/metricq_tools/summary.py b/metricq_tools/summary.py index 9f7537f..6937cd8 100755 --- a/metricq_tools/summary.py +++ b/metricq_tools/summary.py @@ -32,7 +32,6 @@ from sys import exit import click -import click_completion import click_log import metricq import numpy as np @@ -47,8 +46,6 @@ logger = get_root_logger() -click_completion.init() - class Summary: def __init__( diff --git a/setup.cfg b/setup.cfg index b0117f3..f957360 100755 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,6 @@ install_requires = metricq ~= 4.0 click click-log - click-completion async-timeout~=3.0 humanize~=2.5 python-dateutil~=2.8