-
Notifications
You must be signed in to change notification settings - Fork 559
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more type hints for
rdflib.plugins.sparql
(#2268)
A bit of a roundabout reason why this matters now, but basically: I want to add examples for securing RDFLib with `sys.addaudithook` and `urllib.request.install_opener`. I also want to be sure examples are actually valid, and runnable, so I was adding static analysis and simple execution of examples to our CI. During this, I noticed that examples use `initBindings` with `Dict[str,...]`, which was not valid according to mypy, but then after some investigation I realized the type hints in some places were too strict. So the main impetus for this is actually to relax the type hints in `rdflib.graph`, but to ensure this is valid I'm adding a bunch of type hints I had saved up to `rdflib.plugins.sparql`. Even though this PR looks big, it has no runtime changes.
- Loading branch information
Showing
14 changed files
with
453 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.