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

Public Member Functions

None __init__ (self, float|None min=None, float|None max=None, bool min_open=False, bool max_open=False, bool clamp=False)
 
- Public Member Functions inherited from click.types._NumberRangeBase
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.FloatParamType
str __repr__ (self)
 

Static Public Attributes

str name = "float 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.FloatParamType
str name = "float"
 

Protected Member Functions

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

Additional Inherited Members

- 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.FloatParamType
 _number_class = float
 

Detailed Description

Restrict a :data:`click.FLOAT` 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. This is not supported if either
boundary is marked ``open``.

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

Constructor & Destructor Documentation

◆ __init__()

None click.types.FloatRange.__init__ (   self,
float | None   min = None,
float | None   max = None,
bool   min_open = False,
bool   max_open = False,
bool   clamp = False 
)

Reimplemented from click.types._NumberRangeBase.

Member Function Documentation

◆ _clamp()

float click.types.FloatRange._clamp (   self,
float  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: