dispel.processing.flags module#

Data entity flag module.

class dispel.processing.flags.FlagStepMixin[source]#

Bases: TaskMixin

A flag mix in class.

__init__(*args, **kwargs)[source]#
flag_name: AbbreviatedValue | str#

The name of the flag

flag_severity: FlagSeverity | str#
flag_type: FlagType | str#

The type of the flag

flagging_function: Callable[[...], bool] | None = None#

The flagging function

get_flag(**kwargs)[source]#

Get the flag corresponding to the flag step.

Return type:

Flag

get_flag_name(**kwargs)[source]#

Get the flag name.

Return type:

str | AbbreviatedValue

get_flag_severity(**kwargs)[source]#

Get the flag severity.

Return type:

str | FlagSeverity

abstract get_flag_targets(reading, level=None, **kwargs)[source]#

Get flag targets.

Parameters:
  • reading (Reading) – The reading to which the targets are associated.

  • level (Level | None) – The level associated with the targets (if needed).

  • kwargs – Keyword arguments from which the flag targets are to be extracted.

Returns:

An iterable of the flag targets.

Return type:

Iterable[EntityType]

get_flag_type(**kwargs)[source]#

Get the flag type.

Return type:

str | FlagType

get_flagging_function()[source]#

Get the flagging function.

Return type:

Callable[[…], bool] | None

get_flagging_functions()[source]#

Get all flagging functions associated with this step.

Return type:

Generator[Tuple[Callable[[…], bool], Dict[str, Any]], None, None]

get_reason(**kwargs)[source]#

Get the flag reason.

Return type:

str

reason: str#

The detailed reason of the flag

set_flag_kwargs(**kwargs)[source]#

Set keyword arguments inside flagging function.

Parameters:

kwargs – The keyword arguments to be added inside the flagging function keyword arguments.

stop_processing: bool = False#

The stop_processing status of the flag step

dispel.processing.flags.flag(_func=None, **kwargs)[source]#

Decorate a function as a flagging function.