fix: correct imports and __all__ by aucampia · Pull Request #2340 · RDFLib/rdflib (original) (raw)

Summary of changes

Disable
implicit_reexport
and eliminate all errors reported by mypy after this.

This helps ensure that import statements import from the right module and that
the __all__ variable is correct.

These changes caused some Sphinx warnings (which are treated as errors) as
Sphinx is not happy if the namespaces are documented in two places. An example
of one of these errors are:

WARNING: duplicate object description of rdflib.namespace._BRICK.BRICK, other instance in apidocs/rdflib, use :noindex: for one of them

To mitigate this the Sphinx config is updated to ignore the namespaces when
generating docs for apidocs/rdflib.

Checklist