module documentation

Plugin for supporting the functools standard library module.

Function functools_total_ordering_maker_callback Add dunder methods to classes decorated with functools.total_ordering.
Constant functools_total_ordering_makers Undocumented
Class _MethodInfo Undocumented
Function _analyze_class Analyze the class body, its parents, and return the comparison methods found.
Function _find_other_type Find the type of the ``other`` argument in a comparison method.
Constant _ORDERING_METHODS Undocumented
def functools_total_ordering_maker_callback(ctx: mypy.plugin.ClassDefContext, auto_attribs_default: bool = False) -> bool: (source)

Add dunder methods to classes decorated with functools.total_ordering.

functools_total_ordering_makers: set[str] = (source)

Undocumented

Value
set(['functools.total_ordering'])

Analyze the class body, its parents, and return the comparison methods found.

def _find_other_type(method: _MethodInfo) -> Type: (source)

Find the type of the ``other`` argument in a comparison method.

_ORDERING_METHODS: set[str] = (source)

Undocumented

Value
set(['__lt__', '__le__', '__gt__', '__ge__'])