feat: add parser type hints by aucampia · Pull Request #2232 · RDFLib/rdflib (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation3 Commits1 Checks0 Files changed

Conversation

This file contains hidden or 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

[ Show hidden characters]({{ revealButtonHref }})

aucampia

Summary of changes

Add type hints to:

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

@aucampia

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 aucampia marked this pull request as ready for review

February 20, 2023 19:54

@coveralls

Coverage Status

Coverage: 90.696% (+0.01%) from 90.682% when pulling a3bf7bd on aucampia:iwana-20230220T2005-add_parser_typing into d2c9edc on RDFLib:main.

@aucampia

Add type hints to:

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.

ghost

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

heroic! double-plus good

@aucampia aucampia deleted the iwana-20230220T2005-add_parser_typing branch

April 9, 2023 15:04

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

2 participants

@aucampia @coveralls