Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: DefinedNamespace: always raise AttributeError for
_NS
This patch changes `DefinedNamespace` to always raise `AttributeError` if `_NS` is not defined. Without doign this `inspect.signature` recurses infinitely when inspecting `rdflib.namespace.DefinedNamespace`. One situation in which this occurs is when autodoc is generating documentation from type hints. ``` WARNING: error while formatting signature for rdflib.namespace.DefinedNamespace: Handler <function record_typehints at 0x7fbf2696dd40> for event 'autodoc-process-signature' threw an exception (exception: maximum recursion depth exceeded while calling a Python object) ```
- Loading branch information