Bases: object
Bases: object
Bases: object
Bases: object
Bases: ABC
Bases: ArgumentParser
Bases: ArgumentParser
Bases: ArgumentSpecParser
Bases: ArgumentSpecParser
Bases: object
Bases: object
Bases: object
Bases: object
Bases: object
Bases: object
Bases: object
Contains argument information. Only used by Libdoc.
Bases: object
Bases: object
Bases: object
Bases: object
Deprecated since Robot Framework 7.3.
Return True
if name
matches these embedded arguments.
Parse arguments matching these embedded arguments from name
.
Validate that embedded args match custom regexps.
Initial validation is done already when matching keywords, but this validation makes sure arguments match also if they are given as variables.
Currently, argument not matching only causes a deprecation warning, but that will be changed to ValueError
in RF 8.0: https://github.com/robotframework/robotframework/issues/4069
Bases: object
Bases: object
Validate converter. Raise TypeError
for unrecognized types.
Bases: TypeConverter
alias of Enum
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
Bases: TypeConverter
alias of Any
Bases: TypeConverter
alias of str
Bases: TypeConverter
alias of bool
Bases: TypeConverter
alias of int
alias of Integral
Bases: TypeConverter
alias of float
alias of Real
Bases: TypeConverter
alias of Decimal
Bases: TypeConverter
alias of bytes
Bases: TypeConverter
alias of bytearray
Bases: TypeConverter
alias of datetime
Bases: TypeConverter
alias of date
Bases: TypeConverter
alias of timedelta
Bases: TypeConverter
alias of Path
alias of PathLike
Bases: TypeConverter
alias of None
Bases: TypeConverter
alias of list
alias of Sequence
Bases: TypeConverter
alias of tuple
Bases: TypeConverter
Bases: TypeConverter
alias of dict
alias of Mapping
Bases: TypeConverter
alias of set
alias of Set
Bases: SetConverter
alias of frozenset
Bases: TypeConverter
Bases: TypeConverter
Bases: TypeConverter
The type of the None singleton.
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
Bases: TypeConverter
Validate converter. Raise TypeError
for unrecognized types.
Bases: object
Represents an argument type.
Normally created using the from_type_hint()
classmethod. With unions and parametrized types, nested
contains nested types.
Values can be converted according to this type info by using the convert()
method.
Part of the public API starting from Robot Framework 7.0. In such usage should be imported via the robot.api
package.
Nested types as a tuple of TypeInfo
objects.
Used with parameterized types and unions.
Construct a TypeInfo
based on a type hint.
The type hint can be in various different formats:
an actual type such as int
a parameterized type such as list[int]
a union such as int | float
a string such as 'int'
, 'list[int]'
or 'int | float'
a TypedDict
(represented as a TypedDictInfo
)
a sequence of supported type hints to create a union from such as [int, float]
or ('int', 'list[int]')
In special cases using a more specialized method like from_sequence()
may be more appropriate than using this generic method.
Construct a TypeInfo
based on an actual type.
Use from_type_hint()
if the type hint can also be something else than a concrete type such as a string.
Construct a TypeInfo
based on a string.
In addition to just types names or their aliases like int
or integer
, supports also parameterized types like list[int]
as well as unions like int | float
.
Use from_type_hint()
if the type hint can also be something else than a string such as an actual type.
Construct a TypeInfo
based on a sequence of types.
Types can be actual types, strings, or anything else accepted by from_type_hint()
. If the sequence contains just one type, a TypeInfo
created based on it is returned. If there are more types, the returned TypeInfo
represents a union. Using an empty sequence is an error.
Use from_type_hint()
if other types than sequences need to supported.
Construct a TypeInfo
based on a variable.
Type can be specified using syntax like ${x: int}
.
variable – Variable as a string or as an already parsed VariableMatch
object.
handle_list_and_dict – When True
, types in list and dictionary variables get list[]
and dict[]
decoration implicitly. For example, @{x: int}
, &{x: int}
and &{x: str=int}
yield types list[int]
, dict[Any, int]
and dict[str, int]
, respectively.
DataError
if variable has an unrecognized type. Variable not having a type is not an error.
New in Robot Framework 7.3.
Convert value
based on type information this TypeInfo
contains.
value – Value to convert.
name – Name of the argument or other thing to convert. Used only for error reporting.
custom_converters – Custom argument converters.
languages – Language configuration. During execution, uses the current language configuration by default.
kind – Type of the thing to be converted. Used only for error reporting.
allow_unknown – If False
, a TypeError
is raised if there is no converter for this type or to its nested types. If True
, conversion returns the original value instead.
ValueError
if conversion fails and TypeError
if there is no converter for this type and unknown converters are not accepted.
Converted value.
Get argument converter for this TypeInfo
.
custom_converters – Custom argument converters.
languages – Language configuration. During execution, uses the current language configuration by default.
allow_unknown – If False
, a TypeError
is raised if there is no converter for this type or to its nested types. If True
, a special UnknownConverter
is returned instead.
TypeError
if there is no converter and unknown converters are not accepted.
TypeConverter
.
The convert()
method handles the common conversion case, but this method can be used if the converter is needed multiple times or its needed also for other purposes than conversion.
New in Robot Framework 7.2.
Bases: TypeInfo
Represents TypedDict
used as an argument.
Bases: Enum
Bases: object
Bases: object
Bases: object
Bases: object
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4