Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Static Public Attributes | Protected Member Functions | List of all members
click.types.IntRange Class Reference
Inheritance diagram for click.types.IntRange:
Inheritance graph
[legend]
Collaboration diagram for click.types.IntRange:
Collaboration graph
[legend]

Static Public Attributes

str name = "integer range"
 
- Static Public Attributes inherited from click.types.ParamType
is_composite = False
 
arity = 1
 
str name
 
envvar_list_splitter = None
 
- Static Public Attributes inherited from click.types.IntParamType
str name = "integer"
 

Protected Member Functions

int _clamp (self, int bound, t.Literal[1, -1] dir, bool open)
 
- Protected Member Functions inherited from click.types._NumberRangeBase
str _describe_range (self)
 

Additional Inherited Members

- Public Member Functions inherited from click.types._NumberRangeBase
None __init__ (self, float|None min=None, float|None max=None, bool min_open=False, bool max_open=False, bool clamp=False)
 
dict[str, t.Any] to_info_dict (self)
 
t.Any convert (self, t.Any value, Parameter|None param, Context|None ctx)
 
str __repr__ (self)
 
- Public Member Functions inherited from click.types.ParamType
t.Any __call__ (self, t.Any value, Parameter|None param=None, Context|None ctx=None)
 
str|None get_metavar (self, Parameter param, Context ctx)
 
str|None get_missing_message (self, Parameter param, Context|None ctx)
 
cabc.Sequence[str] split_envvar_value (self, str rv)
 
t.NoReturn fail (self, str message, Parameter|None param=None, Context|None ctx=None)
 
list[CompletionItemshell_complete (self, Context ctx, Parameter param, str incomplete)
 
- Public Member Functions inherited from click.types.IntParamType
str __repr__ (self)
 
- Public Attributes inherited from click.types._NumberRangeBase
 min
 
 max
 
 min_open
 
 max_open
 
 clamp
 
- Public Attributes inherited from click.types.ParamType
 envvar_list_splitter
 
- Static Protected Attributes inherited from click.types._NumberParamTypeBase
_number_class .ClassVar[type[t.Any]]
 
- Static Protected Attributes inherited from click.types.IntParamType
 _number_class = int
 

Detailed Description

Restrict an :data:`click.INT` value to a range of accepted
values. See :ref:`ranges`.

If ``min`` or ``max`` are not passed, any value is accepted in that
direction. If ``min_open`` or ``max_open`` are enabled, the
corresponding boundary is not included in the range.

If ``clamp`` is enabled, a value outside the range is clamped to the
boundary instead of failing.

.. versionchanged:: 8.0
    Added the ``min_open`` and ``max_open`` parameters.

Member Function Documentation

◆ _clamp()

int click.types.IntRange._clamp (   self,
int  bound,
t.Literal[1, -1]  dir,
bool   open 
)
protected
Find the valid value to clamp to bound in the given
direction.

:param bound: The boundary value.
:param dir: 1 or -1 indicating the direction to move.
:param open: If true, the range does not include the bound.

Reimplemented from click.types._NumberRangeBase.


The documentation for this class was generated from the following file: