![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|
Functions | |
| bool | is_supported_union (Any typ) |
| Callable[[Mapping[Any, Any]], type[Any]|None] | create_default_dis_func (BaseConverter converter, *type[AttrsInstance] classes, bool use_literals=True,(dict[str, AttributeOverride]|Literal["from_converter"]) overrides="from_converter") |
| str | _overriden_name (Attribute at, AttributeOverride|None override) |
| tuple[set[str], dict[str, str]] | _usable_attribute_names (type[Any] cl, dict[str, AttributeOverride] overrides) |
Variables | |
| Callable[[Mapping[Any, Any]], type[Any]|None] | create_uniq_field_dis_func = create_default_dis_func |
Utilities for union (sum type) disambiguation.
|
protected |
Return renamed fields and a mapping to original field names.
| Callable[[Mapping[Any, Any]], type[Any] | None] cattrs.disambiguators.create_default_dis_func | ( | BaseConverter | converter, |
| *type[AttrsInstance] | classes, | ||
| bool | use_literals = True, |
||
| ( dict[str, AttributeOverride] | Literal["from_converter"] ) | overrides = "from_converter" |
||
| ) |
Given attrs classes or dataclasses, generate a disambiguation function.
The function is based on unique fields without defaults or unique values.
:param use_literals: Whether to try using fields annotated as literals for
disambiguation.
:param overrides: Attribute overrides to apply.
.. versionchanged:: 24.1.0
Dataclasses are now supported.
| bool cattrs.disambiguators.is_supported_union | ( | Any | typ | ) |
Whether the type is a union of attrs classes.