Protocol Implements Decorator package

Module contents

The protocol_implements_decorator package.

protocolimplementsdecorator.implements(*args)[source]

Check if a class implements a given protocol.

Parameters:

args (Any) – The protocols to check for implementation.

Returns:

The inner wrapper function.

Return type:

Callable[[FuncT], FuncT]

Raises:

NotImplementedError – If the class does not implement all the methods and attributes required by the protocol.