habitat_sim.utils.validators.NoAttrValidationContext class

Ensures validators are not run within this context. Useful for function where we generate an attr validated object.

Methods

def _recreate_cm(self)
Return a recreated instance of self.

Special methods

def __call__(self, func)
def __enter__(self) -> NoAttrValidationContext
def __exit__(self, *exc) -> None
def __init__(self, original_state: typing.Optional[bool] = None) -> None
Method generated by attrs for class NoAttrValidationContext.

Properties

original_state: typing.Optional[bool] get set del

Method documentation

def habitat_sim.utils.validators.NoAttrValidationContext._recreate_cm(self)

Return a recreated instance of self.

Allows an otherwise one-shot context manager like _GeneratorContextManager to support use as a decorator via implicit recreation.

This is a private interface just for _GeneratorContextManager. See issue #11647 for details.