-
Notifications
You must be signed in to change notification settings - Fork 555
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 parser type hints #2232
Merged
aucampia
merged 1 commit into
RDFLib:main
from
aucampia:iwana-20230220T2005-add_parser_typing
Mar 5, 2023
Merged
feat: add parser type hints #2232
aucampia
merged 1 commit into
RDFLib:main
from
aucampia:iwana-20230220T2005-add_parser_typing
Mar 5, 2023
Conversation
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
A compact diff with all non-runtime content (e.g. comments, type-hints) stripped out can be found here: https://gist.github.com/aucampia/91e1bfb27351ebd63c3285d052a34d7e#file-compact-diff Generated with: 20230220T204956 iwana@teekai.zoic.eu.org:~/sw/d/github.com/iafork/rdflib.reviews
$ git log -1
commit db682801f0b2a3a05cbe8e9c33a93911e6103a04 (HEAD -> iwana-20230220T2005-add_parser_typing)
Author: Iwan Aucamp <aucampia@gmail.com>
Date: Mon Feb 20 19:36:30 2023 +0000
feat: add parser type hints
Add type hints to `rdflib/plugins/parser/*.py` and JSON-LD utils.
This is mainly because the work I'm doing to fix
<https://github.com/RDFLib/rdflib/issues/1844> is touching some of this
parser stuff and the type hints are useful to avoid mistakes.
20230220T204958 iwana@teekai.zoic.eu.org:~/sw/d/github.com/iafork/rdflib.reviews
$ git status
On branch iwana-20230220T2005-add_parser_typing
Your branch and 'origin/iwana-20230220T2005-add_parser_typing' have diverged,
and have 1 and 1 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)
nothing to commit, working tree clean
20230220T205000 iwana@teekai.zoic.eu.org:~/sw/d/github.com/iafork/rdflib.reviews
$ PYLOGGING_LEVEL=INFO task run -- git difftool -y -x $(readlink -f devtools/diffrtpy.py) upstream/main > /var/tmp/compact.diff
task: [venv:run] poetry run git difftool -y -x /home/iwana/sw/d/github.com/iafork/rdflib.reviews/devtools/diffrtpy.py upstream/main
|
aucampia
force-pushed
the
iwana-20230220T2005-add_parser_typing
branch
from
February 20, 2023 19:50
90baf7a
to
db68280
Compare
aucampia
added
review wanted
This indicates that the PR is ready for review
ready to merge
The PR will be merged soon if no further feedback is provided.
labels
Feb 20, 2023
aucampia
force-pushed
the
iwana-20230220T2005-add_parser_typing
branch
2 times, most recently
from
February 20, 2023 21:16
8dc5b98
to
bdde0e8
Compare
Add type hints to: - `rdflib/parser.py` - `rdflib/plugins/parser/*.py` - some JSON-LD utils - `rdflib/exceptions.py`. This is mainly because the work I'm doing to fix <RDFLib#1844> is touching some of this parser stuff and the type hints are useful to avoid mistakes. No runtime changes are included in this PR.
aucampia
force-pushed
the
iwana-20230220T2005-add_parser_typing
branch
from
February 20, 2023 21:23
bdde0e8
to
a3bf7bd
Compare
ghost
approved these changes
Feb 21, 2023
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.
heroic! double-plus good
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ready to merge
The PR will be merged soon if no further feedback is provided.
review wanted
This indicates that the PR is ready for review
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
Add type hints to:
rdflib/parser.py
rdflib/plugins/parser/*.py
rdflib/exceptions.py
.This is mainly because the work I'm doing to fix
#1844 is touching some of this parser stuff and the type hints are useful to avoid mistakes.
No runtime changes are included in this PR.
Checklist
the same change.
so maintainers can fix minor issues and keep your PR up to date.