From 050fc90a0e67210cb3b256f8a5965292e24e4cc3 Mon Sep 17 00:00:00 2001 From: Caceresenzo Date: Thu, 14 Dec 2023 11:22:47 +0100 Subject: [PATCH] fix(cli/manual): convert `tuple` to `list` --- readwrite/__version__.py | 2 +- readwrite/cli/manual.py | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/readwrite/__version__.py b/readwrite/__version__.py index a8d9bef..6af7c50 100644 --- a/readwrite/__version__.py +++ b/readwrite/__version__.py @@ -1,6 +1,6 @@ __title__ = 'readwrite' __description__ = 'readwrite - Quickly read/write file in common formats' -__version__ = '0.3.3' +__version__ = '0.3.4' __author__ = 'Enzo CACERES' __author_email__ = 'enzo.caceres@crunchdao.com' __url__ = 'https://github.com/crunchdao/readwrite' diff --git a/readwrite/cli/manual.py b/readwrite/cli/manual.py index 7345175..9348088 100644 --- a/readwrite/cli/manual.py +++ b/readwrite/cli/manual.py @@ -32,16 +32,16 @@ def func( __handler=handler, **kwargs ): - params = { - key: None if isinstance(value, tuple) and not len(value) else value - for key, value in kwargs.items() - } + params = {} + for key, value in kwargs.items(): + if isinstance(value, tuple): + if len(value): + value = list(value) + else: + value = None - params = { - key: value - for key, value in params.items() - if value is not None - } + if value is not None: + params[key] = value start_session( registry,