ABCLookupInfo

class app.util.helpers.abc_info.ABCLookupInfo[source]

Bases: NamedTuple

Runtime metadata describing an ABC and its related concrete bases.

Inheritance diagram of ABCLookupInfo

Inheritance Diagram for ABCLookupInfo

Methods

Attributes

abc

Primary abstract base class inspected for compatibility.

abcs

All ABCs satisfied by the primary ABC through inheritance.

has_keys

Return True when the ABC has keys.

has_values

Return True when the ABC has values.

is_recursive

Return True when the ABC describes a recursive collection, i.e. one where the value_type is the same as the ABC.

possible_bases

Built-in concrete types that may implement the ABC.

static __new__(_cls, abc: type[ABCType], abcs: tuple[type[ABCType], ...], possible_bases: tuple[type, ...])

Create new instance of ABCLookupInfo(abc, abcs, possible_bases)

Parameters:
abc: type[ABCType]

Primary abstract base class inspected for compatibility.

abcs: tuple[type[ABCType], ...]

All ABCs satisfied by the primary ABC through inheritance.

property has_keys: bool

Return True when the ABC has keys.

property has_values: bool

Return True when the ABC has values.

property is_recursive: bool

Return True when the ABC describes a recursive collection, i.e. one where the value_type is the same as the ABC.

possible_bases: tuple[type, ...]

Built-in concrete types that may implement the ABC.