Type Schemas

Or, a schematic.

class typerighter.schematics.Schematic(klass)[source]

A Schematic is a object that maintains a Type’s argspec. It exists as a class to provide a namespace for relevant values.

typerighter.schematics.extract_argspec(klass)[source]

Inspects a klass and creates a dict of keyword arguments and their default values.

Parameters

klass (class) – The class definition to inspect

Returns

a dictionary of default values found in argspec for class’s init

typerighter.schematics.init_arg_capture(method)[source]

A decorator that wraps a Type’s __init__ method for the purpose of capturing the arguments used when a Type is instantiated so it can then update the instance’s argspec with what was actually used.