OrderedViewCollection

class app.portfolio.collections.ordered_view.collection.OrderedViewCollection[source]

Bases: Collection, Generic

Inheritance diagram of OrderedViewCollection

Inheritance Diagram for OrderedViewCollection

Methods

__init__([data])

clear_sort_cache()

get_content_type(cls[, source])

Resolve and cache the concrete parent argument defined by the descriptor.

get_core_schema(source, handler)

get_journalled_type()

item_sort_key(item)

serialize(value)

validate_and_coerce(value, *[, source])

Attributes

item_sort_reverse

sort

sorted

__init__(data: Iterable | None = None, /) None[source]
Parameters:

data (Iterable | None)

Return type:

None

clear_sort_cache() None[source]
Return type:

None

classmethod get_content_type(cls: type[T], source: type[T] | None = None, **kwargs: Unpack[GetConcreteParentArgumentKwargs]) type[R]

Resolve and cache the concrete parent argument defined by the descriptor.

The descriptor caches the result per owning class via instance_lru_cache() so repeated introspections remain constant time.

Raises:

GenericsError – If the underlying parent argument cannot be resolved to a concrete type.

Parameters:
Return type:

type[R]

abstractmethod classmethod get_core_schema(source, handler) InvalidSchema | AnySchema | NoneSchema | BoolSchema | IntSchema | FloatSchema | DecimalSchema | StringSchema | BytesSchema | DateSchema | TimeSchema | DatetimeSchema | TimedeltaSchema | LiteralSchema | MissingSentinelSchema | EnumSchema | IsInstanceSchema | IsSubclassSchema | CallableSchema | ListSchema | TupleSchema | SetSchema | FrozenSetSchema | GeneratorSchema | DictSchema | AfterValidatorFunctionSchema | BeforeValidatorFunctionSchema | WrapValidatorFunctionSchema | PlainValidatorFunctionSchema | WithDefaultSchema | NullableSchema | UnionSchema | TaggedUnionSchema | ChainSchema | LaxOrStrictSchema | JsonOrPythonSchema | TypedDictSchema | ModelFieldsSchema | ModelSchema | DataclassArgsSchema | DataclassSchema | ArgumentsSchema | ArgumentsV3Schema | CallSchema | CustomErrorSchema | JsonSchema | UrlSchema | MultiHostUrlSchema | DefinitionsSchema | DefinitionReferenceSchema | UuidSchema | ComplexSchema[source]
Return type:

InvalidSchema | AnySchema | NoneSchema | BoolSchema | IntSchema | FloatSchema | DecimalSchema | StringSchema | BytesSchema | DateSchema | TimeSchema | DatetimeSchema | TimedeltaSchema | LiteralSchema | MissingSentinelSchema | EnumSchema | IsInstanceSchema | IsSubclassSchema | CallableSchema | ListSchema | TupleSchema | SetSchema | FrozenSetSchema | GeneratorSchema | DictSchema | AfterValidatorFunctionSchema | BeforeValidatorFunctionSchema | WrapValidatorFunctionSchema | PlainValidatorFunctionSchema | WithDefaultSchema | NullableSchema | UnionSchema | TaggedUnionSchema | ChainSchema | LaxOrStrictSchema | JsonOrPythonSchema | TypedDictSchema | ModelFieldsSchema | ModelSchema | DataclassArgsSchema | DataclassSchema | ArgumentsSchema | ArgumentsV3Schema | CallSchema | CustomErrorSchema | JsonSchema | UrlSchema | MultiHostUrlSchema | DefinitionsSchema | DefinitionReferenceSchema | UuidSchema | ComplexSchema

classmethod get_journalled_type() type[JournalledOrderedViewSet][source]
Return type:

type[JournalledOrderedViewSet]

item_sort_key(item: T) SupportsRichComparison[source]
Parameters:

item (T)

Return type:

SupportsRichComparison

property item_sort_reverse: bool
abstractmethod classmethod serialize(value: Self) Any[source]
Parameters:

value (Self)

Return type:

Any

property sort: Sequence[source]
property sorted: Sequence
classmethod validate_and_coerce(value: Any, *, source: type[Self] | None = None) Self[source]
Parameters:
Return type:

Self