Convtools

Latest version: v1.14.3

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 18

0.23.3

**Bugfix**

- fixed long existing bug in aggregations in cases where multiple reducers get
initialized at different moments, e.g. the first reducer collects min values
of column "a", while the second reducer collects max values of column "b",
"min a" may get initialized earlier than "max b" and then this would raise
``Exception``

0.23.2

**Bugfix**

- fixed ``c.attr("a", default=None).attr("b", default=None)`` (preferred
``c.attr("a", "b", default=None)`` was working though)
- fixed too-many-parenthesis error for long chains of ``and_``, ``or_`` and
``==``

0.23.1

**Misc**

- allowed passing callables to ``and_then`` so they are called with input as an
argument
- made ``and_then`` handle the default case as ``a and conv(a)`` not ``if``

0.23.0

**Features**

- added ``c.and_then`` and ``(...).and_then`` shortcut to pipe if condition is
true, otherwise leave untouched. Supports overriding default ``bool``
condition.

0.22.0

[16](https://github.com/westandskif/convtools/pull/16)

**Features**

- added ``c.ReduceFuncs.ArraySorted`` reducer
- reworked ``GetItem`` and ``GetAttr`` to cache ``get_or_default`` methods
based on number of indexes and args
- added support for single column tables (headers are always str still)

**Misc**

- updated internals of arg def handling, made naive and labels optional
- removed ``NamedConversion`` and ``ConversionWrapper`` in favor of new
``LazyEscapedString``, ``Namespace`` and ``NamespaceCtx``. This lays better
groundwork for future use of conversions which generate code around another
named ones.

0.21.0

**Features**

- backward-compatible change: now ``c.this`` is preferred over ``c.this()``
- ``c.and_`` and ``c.or_`` support any number of arguments (used to be 2
mandatory ones). And also supports ``default: bool = None`` argument to
control what should happen if no arguments are passed:

* if None, raises ``ValueError``
* if false value, returns ``False``
* if true value, returns ``True``

Page 10 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.