Source code for tempor.models.clairvoyance2.utils.dev
# mypy: ignore-errorsimportinspectfromtypingimportCallable,NoReturnNEEDED=None"""In case a value is set to `None` as a placeholder, or temporarily, or for any other reason,differentiate with `NEEDED`. For code clarity only."""NOT_IMPLEMENTED_MESSAGE="Feature not yet implemented: $FEATURE"
[docs]deffunction_is_notimplemented_stub(function:Callable)->bool:# Somewhat of a kludge.source=inspect.getsource(function)lines=[line.strip()forlineinsource.split("\n")iflen(line)>0]iflen(lines)>0and"raise NotImplementedError"inlines[-1]:returnTrueelse:returnFalse