-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add type hints for rdflib.store
and rdflib.plugins.stores
#2057
feat: add type hints for rdflib.store
and rdflib.plugins.stores
#2057
Conversation
I will publish this tomorrow, I'm writing a script to diff python source code with type hints and comments removed, so it is easier to review these PRs. |
8303d8e
to
97c686f
Compare
Compact diff can be found here: https://gist.github.com/aucampia/3f380070fbd8f0e8a99aea2df6cc1f06 |
@ajnelson-nist @mielvds tagging you in case you have time to review. |
@aucampia : I don't really have experience with this area in the code, so I don't have cogent feedback aside from noticing a documentation typo. |
97c686f
to
5d05b96
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, will be v. useful for ADR
Add type hints and aliases for `rdflib.store` and `rdflib.plugins.stores` and also add a couple of more type hints and aliases to `rdflib.graph`. This PR contains no runtime changes. Other changes: - Changed some imports to be more specific (e.g. `import from rdflib.graph` instead of `import from rdflib`). This is to reduce the probability of circular imports. - Ignore `E231` (missing whitespace after ',') in flake8 as black is managing the whitespaces and seems to be bumping heads with flake8 with spaces after `,` sometimes. - Install `berkeleydb-stubs` when doing extensive testing with tox. - Added `devtools/diffrtpy.py` which is a script that can be used with `git difftool` to generate compact diffs for python code. This should make it a lot easier to review PRs that change type hints to verify that they don't have a runtime impact.
5d05b96
to
16d9618
Compare
Summary of changes
Add type hints and aliases for
rdflib.store
andrdflib.plugins.stores
and also add a couple of more type hints andaliases to
rdflib.graph
.This PR contains no runtime changes.
Other changes:
import from rdflib.graph
instead ofimport from rdflib
). This is to reducethe probability of circular imports.
E231
(missing whitespace after ',') in flake8 as black ismanaging the whitespaces and seems to be bumping heads with flake8
with spaces after
,
sometimes.berkeleydb-stubs
when doing extensive testing with tox.devtools/diffrtpy.py
which is a script that can be used withgit difftool
to generate compact diffs for python code. This shouldmake it a lot easier to review PRs that change type hints to verify
that they don't have a runtime impact.
Compact diff: https://gist.github.com/aucampia/3f380070fbd8f0e8a99aea2df6cc1f06
Checklist
the same change.
CHANGELOG.md
).so maintainers can fix minor issues and keep your PR up to date.