|
Currently rdflib is relying on sphinx-autodoc's built in handling for type
hints, this however has some deficiencies as it does not handle stuff
inside `if TYPE_CHECKING:` and thus only work in cases where there are no
potential for circular dependencies.
This patch changes sphinx to use sphinx-autodoc-typehints instead, the
documentation generated by this plugin looks slightly different but as a
positive it correctly works with things defined inside `if TYPE_CHECKING:`
guards.
Also:
- moved the `_NamespaceSetString` type alias to `rdflib._type_checking`
This is so that `sphinx-autodoc-typehints` recognizes it up, as it
does not handle type aliases that are defined inside
`if TYPE_CHECKING:` guards in imported files.
- remove sphinx requirements from requirements.dev.txt and
replaced it with -r docs/sphinx-requirements.txt to reduce redundancy.
|