Cloup

Latest version: v3.0.5

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

Scan your dependencies

Page 1 of 5

1.0.2

=======================
- Skip constraints checking when passing ``--help`` to a subcommand. :issue:`129`

1.0.1

=======================
- Show a helpful error message when some tries to use command decorators without
parenthesis. :pr:`128`

1.0.0

===================
- Drop support for Python 3.6. Python 3.6 ha reached end-of-life in Dec 2021 and
it's not officially supported by Click 8. From https://pypistats.org/packages/cloup,
I can see that about 37% of people are still using Python 3.6. If you can't
upgrade, you should still be able to use Cloup by installing the ``dataclasses``
backport package and using a compatible version of Click.

- Drop support for Click 7.

- Run tests on Python 3.10.

--------------------------------------------------------------------------------

0.15.1

====================

Bug fixes
---------
- Fix type of ``type`` argument of ``option`` and ``argument``. Specifically,
tuple types weren't correctly described.
- Reimplement ``argument`` and ``option`` without calling the corresponding
Click methods (:pr:`124`):

- make decorators returned by ``argument`` reusable by not relying on bugged
Click implementation
- remove unnecessary copy of ``**attrs`` in ``option``.

0.15.0

====================
New features and enhancements
-----------------------------
- Renamed ``Argument.help_record`` to ``Argument.get_help_record``. :pr:`116`
- Fixed typos and some type annotations. :pr:`116`
- In mixins, moved call to ``super()`` at the beginning of ``__init__``. :pr:`119`.
- Made Cloup pass ``mypy --strict``. :pr:`122`

Bug fixes
---------
- The title of the default option group was "Other options" when the only other
parameter help section was "Positional arguments". It's now "Options". :pr:`120`

Breaking changes
----------------
- Renamed ``Argument.help_record`` to ``Argument.get_help_record``.
- In mixins, moved call to ``super()`` at the beginning of ``__init__``. :pr:`119`.

--------------------------------------------------------------------------------

0.14.0

====================
New features and enhancements
-----------------------------
- You can show a "Positional arguments" help section by passing a non-empty
``help`` description for at least one of the arguments of a command/group.
:pr:`113`
- ``cloup.Group`` now extends ``cloup.Command`` and, as a consequence, supports
option groups and constraints. :pr:`113`
- ``GroupedOption`` is now an alias of ``cloup.Option``.
- Add the new ``params`` Click argument to ``command`` and ``group``
signatures. This argument is supported only for click >= 8.1.0. See
https://github.com/pallets/click/pull/2203.

Breaking changes
----------------
- ``BaseCommand`` was removed. This shouldn't cause any issue to anybody.
- ``cloup.Group`` extends ``cloup.Command``, similarly as ``click.Group``
extends ``click.Command``.
- ``OptionGroupMixin.format_options`` was renamed to ``format_params``. This
means you can't just mix it with ``click.Command`` to print help sections for
option groups, you have to override ``format_help`` and call ``format_params``.
- The new ``format_params`` doesn't call ``super().format_commands`` as
``format_options`` did: that's what Click does and Cloup (reluctantly) did.
Now, instead, ``cloup.Command`` calls ``format_params`` in ``format_help`` and
then, for multi-commands, calls ``format_commands`` directly.
- ``ConstraintMixin.format_help`` was removed. This means you can't just mix it
with a click.Command to make it print the "Constraints" help section, you need
to call ``format_constraints`` explicitly in your command ``format_help``.

--------------------------------------------------------------------------------

Page 1 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.