Decorators

Decorators package of ispec.

Module containing the decorators, the core functionalities of the library.

ispec.decorators.abstractclass(cls: type[object]) type[object][source]

Class decorator that make a decorated class abstract.

Parameters:

cls (type[object]) –

Return type:

type[object]

ispec.decorators.ispec(cls: type[object]) type[object][source]

Class decorator that apply @abstractclass and @typehint on a decorated class.

Parameters:

cls (type[object]) –

Return type:

type[object]

ispec.decorators.typehint(cls: type[object]) type[object][source]

Class decorator that check if the decorated class is correctly type hinted.

Parameters:

cls (type[object]) –

Return type:

type[object]