![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|
Functions | |
| bool | is_any_set (type) |
| bool | is_namedtuple (Any type) |
| bool | _is_passthrough (type[tuple] type, BaseConverter converter) |
| StructureHook | list_structure_factory (type type, BaseConverter converter) |
| UnstructureHook | namedtuple_unstructure_factory (type[tuple] cl, BaseConverter converter, Any unstructure_to=None) |
| StructureHook | namedtuple_structure_factory (type[tuple] cl, BaseConverter converter) |
| list[Attribute] | _namedtuple_to_attrs (type[tuple] cl) |
| StructureHook | namedtuple_dict_structure_factory (type[tuple] cl, BaseConverter converter, bool|Literal["from_converter"] detailed_validation="from_converter", bool forbid_extra_keys=False, bool use_linecache=True, **AttributeOverride kwargs) |
| UnstructureHook | namedtuple_dict_unstructure_factory (type[tuple] cl, BaseConverter converter, bool omit_if_default=False, bool use_linecache=True, **AttributeOverride kwargs) |
Variables | |
| T = TypeVar("T") | |
Utility functions for collections.
|
protected |
If all fields would be passed through, this class should not be processed either.
|
protected |
Generate pseudo attributes for a namedtuple.
| bool cattrs.cols.is_any_set | ( | type | ) |
A predicate function for both mutable and frozensets.
| bool cattrs.cols.is_namedtuple | ( | Any | type | ) |
A predicate function for named tuples.
| StructureHook cattrs.cols.list_structure_factory | ( | type | type, |
| BaseConverter | converter | ||
| ) |
A hook factory for structuring lists. Converts any given iterable into a list.
| StructureHook cattrs.cols.namedtuple_dict_structure_factory | ( | type[tuple] | cl, |
| BaseConverter | converter, | ||
| bool | Literal["from_converter"] | detailed_validation = "from_converter", |
||
| bool | forbid_extra_keys = False, |
||
| bool | use_linecache = True, |
||
| **AttributeOverride | kwargs | ||
| ) |
A hook factory for hooks structuring namedtuples from dictionaries.
:param forbid_extra_keys: Whether the hook should raise a `ForbiddenExtraKeysError`
if unknown keys are encountered.
:param use_linecache: Whether to store the source code in the Python linecache.
.. versionadded:: 24.1.0
| UnstructureHook cattrs.cols.namedtuple_dict_unstructure_factory | ( | type[tuple] | cl, |
| BaseConverter | converter, | ||
| bool | omit_if_default = False, |
||
| bool | use_linecache = True, |
||
| **AttributeOverride | kwargs | ||
| ) |
A hook factory for hooks unstructuring namedtuples to dictionaries.
:param omit_if_default: When true, attributes equal to their default values
will be omitted in the result dictionary.
:param use_linecache: Whether to store the source code in the Python linecache.
.. versionadded:: 24.1.0
| StructureHook cattrs.cols.namedtuple_structure_factory | ( | type[tuple] | cl, |
| BaseConverter | converter | ||
| ) |
A hook factory for structuring namedtuples from iterables.
| UnstructureHook cattrs.cols.namedtuple_unstructure_factory | ( | type[tuple] | cl, |
| BaseConverter | converter, | ||
| Any | unstructure_to = None |
||
| ) |
A hook factory for unstructuring namedtuples. :param unstructure_to: Force unstructuring to this type, if provided.