From 61b3cd0fe18c297b00393924473483917a1a8208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Mon, 2 Oct 2023 13:53:26 +0200 Subject: [PATCH] v2.23.3 --- CHANGELOG.md | 1 + satella/__init__.py | 2 +- satella/coding/decorators/arguments.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d764f35..f0b5c978 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ # v2.23.2 * some docs updates for IntervalTerminableThread +* added better error code for invalid number of arguments in for_argument diff --git a/satella/__init__.py b/satella/__init__.py index 7048ba01..1864b194 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.23.3a2' +__version__ = '2.23.3' diff --git a/satella/coding/decorators/arguments.py b/satella/coding/decorators/arguments.py index cc0a712d..cf257893 100644 --- a/satella/coding/decorators/arguments.py +++ b/satella/coding/decorators/arguments.py @@ -364,7 +364,7 @@ def for_argument(*t_ops: ForArgumentArg, **t_kwops: ForArgumentArg): @wraps(fun) def inner(*args, **kwargs): # add extra 'None' argument if unbound method - assert len(args) >= len(t_ops) + assert len(args) >= len(t_ops), 'Invalid number of arguments' a = fun(*((_NOP if op2 is None else op2)(arg) for arg, op2 in itertools.zip_longest(args, t_ops, fillvalue=None)), **{k: t_kwops.get(k, _NOP)(v) for k, v in kwargs.items()}) -- GitLab