Internal Development Interface

Module falsifier.__

Common constants, imports, and utilities.

falsifier.__.ClassDecorators

alias of Iterable[Callable[[type], type]]

class falsifier.__.ConcealerExtension

Bases: object

Conceals instance attributes according to some criteria.

By default, public attributes are displayed.

class falsifier.__.ImmutableClass(name: str, bases: tuple[type, ...], namespace: dict[str, Any], *, decorators: Iterable[Callable[[type], type]] = (), **args: Any)

Bases: type

Concealment and immutability on class attributes.

mro()

Return a type’s method resolution order.

class falsifier.__.ImmutableModule(name, doc=None)

Bases: ConcealerExtension, ModuleType

Concealment and immutability on module attributes.

class falsifier.__.ImmutableObject

Bases: ConcealerExtension

Concealment and immutability on instance attributes.

falsifier.__.calculate_class_fqname(class_: type) str

Calculates fully-qualified name for class.

falsifier.__.calculate_fqname(obj: object) str

Calculates fully-qualified name for class of object.

falsifier.__.discover_public_attributes(attributes: Mapping[str, Any]) tuple[str, ...]

Discovers public attributes of certain types from dictionary.

By default, callables, including classes, are discovered.

falsifier.__.reclassify_modules(attributes: Annotated[Mapping[str, Any] | ModuleType | str, Doc('Module, module name, or dictionary of object attributes.')], recursive: Annotated[bool, Doc('Recursively reclassify package modules?')] = False) None

Reclassifies modules to be immutable.

falsifier.__.repair_class_reproduction(original: type, reproduction: type) None

Repairs a class reproduction, if necessary.