:orphan: :mod:`cloup.constraints._support` ================================= .. py:module:: cloup.constraints._support Classes summary --------------- .. autosummary:: ~cloup.constraints._support.BoundConstraintSpec ~cloup.constraints._support.BoundConstraint ~cloup.constraints._support.ConstraintMixin Functions Summary ----------------- .. autosummary:: ~cloup.constraints._support.constraint Contents -------- .. class:: BoundConstraintSpec Bases: :py:obj:`NamedTuple` A NamedTuple storing a ``Constraint`` and the **names of the parameters** if has check. .. attribute:: constraint :annotation: :cloup.constraints._core.Constraint .. attribute:: params :annotation: :Sequence[str] .. function:: constraint(constr, params) Registers a constraint. .. class:: BoundConstraint Bases: :py:obj:`NamedTuple` Internal utility ``NamedTuple`` that represents a ``Constraint`` bound to a collection of ``Parameter`` instances. Note: this is not a subclass of Constraint. .. attribute:: constraint :annotation: :cloup.constraints._core.Constraint .. attribute:: params :annotation: :Sequence[click.Parameter] .. method:: check_consistency(self) .. method:: check_values(self, ctx) .. method:: get_help_record(self, ctx) .. class:: ConstraintMixin(*args, constraints = (), show_constraints = False, **kwargs) Provides support to constraints. .. method:: parse_args(self, ctx, args) .. method:: get_param_by_name(self, name) .. method:: get_params_by_name(self, names) .. method:: format_constraints(self, ctx, formatter) .. method:: format_help(self, ctx, formatter)