summaryrefslogtreecommitdiff
path: root/rdflib/_type_checking.py
Commit message (Collapse)AuthorAgeFilesLines
* feat: add typing to `rdflib.path` (#2261)Iwan Aucamp2023-03-121-0/+2
| | | | | | There are some deprecation warnings coming from here as `evalPath` is used internally. I want to fix them, but I want type checking to ensure I don't mess up, so this just adds type checking, will fix the deprecation warnings in a separate PR.
* docs: switch to sphinx-autodoc-typehintsIwan Aucamp2022-04-191-0/+29
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.