Cloup

Latest version: v3.0.5

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

Scan your dependencies

Page 2 of 5

0.13.1

====================
- Since version 8.1.0, Click does not normalize the command attributes ``help``,
``short_help`` and ``epilog`` while Cloup assumed them to be normalized as
in previous releases. This lead to Cloup printing non-normalized help and
epilog text when using click >= 8.1.0.

0.13.0

====================
- Add shortcuts for ``click.Path`` types which uses ``pathlib.Path``
as ``path_type`` by default:
- ``cloup.path``
- ``cloup.dir_path`` (``file_okay=False``)
- ``cloup.file_path`` (``dir_okay=False``)

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

0.12.1

====================
- Fix: when ``OptionGroupMixin`` is mixed with ``Group``, subcommands weren't shown.

0.12.0

====================
- Feature: when a subcommand is mistyped, show "did you mean <subcommand>?".
- Doc fixes.

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

0.11.0

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

No major changes in this release, just refinements.

- Attributes of parametric constraints are now public. :pr:`82`
- Slightly changed the ``repr()`` of ``RequireExactly(3)``:
from ``RequireExactly(n=3)`` to ``RequireExactly(3)``.
- Minor code refactoring.
- Docs fixes and improvements.

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

0.10.0

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

New features and enhancements
-----------------------------
- New feature: subcommand aliases. :issue:`64` :pr:`75`

- Command decorators: improvements to type hints and other changes (:pr:`67`):

- mypy can now infer the exact type of the instantiated command based on the
``cls`` argument. --- Unfortunately, this required the use of ``overload`` to
work around a mypy limitation
- in ``group``, allow ``cls`` to be any ``click.Group`` --- previously it had to
be a subclass of ``cloup.Group``
- in ``Group.command`` and ``Group.group`` add type hints and make all arguments
except ``name`` keyword-only. Technically this is a (minor) incompatibility
with the ``click.Group`` superclass, but it's coherent with Cloup's
``command`` and ``group``
- add Cloup-specific arguments to the signature of ``command``; if the developer
uses one of such arguments with a ``cls`` that doesn't support them, Cloup
augments the resulting ``TypeError`` with extra information.

- Export Click types from Cloup namespace for convenience. :issue:`72`

- In dark and light themes, the epilog is now left unstyled by default. :issue:`62`

Bug fixes
---------
- ``SectionMixin.add_section`` called ``super().add_command`` rather than
``self.add_command``. This caused ``add_command`` in subclasses not to be
called. :issue:`69`

- Fix ``Context.check_constraints_consistency`` not being propagated to descendant
contexts. :issue:`74`

Breaking changes
----------------
- In ``Group.command`` and ``Group.group`` all arguments except ``name`` are now
keyword-only.

- The ``name`` parameter/attribute of ``OptionGroup`` was renamed to ``title``.

- In ``SectionMixin`` (thus, in ``Group``), added a ``ctx: Context`` attribute
to make_commands_help_section and format_subcommand_name to support the
``show_subcommand_aliases`` setting.

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

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.