Skip to content
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

[DO NOT REVIEW] Add a bunch of typing #1850

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aucampia
Copy link
Member

This is a branch I'm maintaing with a bunch of typing, I'm planning to
integrate it with master in parts, anyone is welcome to have a look but
most of what is happening here is subject to change.

Creating this pull request mainly go get docs built and verifying everything is working on all platforms.

@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 4 times, most recently from 955b41f to beb89f0 Compare April 18, 2022 19:36
aucampia added a commit to aucampia/rdflib that referenced this pull request Apr 18, 2022
This PR adds a bunch of typing for rdflib.graph, mainly as a baseline
for adding typing to rdflib.store which I will do next.

I have resorted to using type aliases for typing all the functions, in
part because it makes it easier to change in the future, however autodoc
type hints do not work particularly well with this which is why I will
switch to https://github.com/tox-dev/sphinx-autodoc-typehints in a
separate patch.

This patch only contains typing changes and does not change runtime
behaviour.

Broken off from RDFLib#1850
aucampia added a commit to aucampia/rdflib that referenced this pull request Apr 18, 2022
This patch adds more type hints for rdflib.graph, mainly as a baseline
for adding typing to rdflib.store which I will do next.

I have resorted to using type aliases, in part because it makes it
easier to change in the future and to keep everything consistent.

One downside to the type aliases is that autodoc type hints do not
work particularly well with this which is why I will
switch to https://github.com/tox-dev/sphinx-autodoc-typehints in a
separate patch.

This patch only contains typing changes and does not change runtime
behaviour.

Broken off from RDFLib#1850
aucampia added a commit to aucampia/rdflib that referenced this pull request Apr 18, 2022
This patch primarily adds more type hints for `rdflib.graph`, but also
adds type hints to some related modules in order to work with the new
type hints for `rdflib.graph`.

I'm mainly doing this as a baseline for adding type hints to
`rdflib.store`.

I have created type aliases to make it easier to type everything
cosnsitently and to make type hints easier easier to change in the
future. The type aliases are private however (i.e. `_`-prefixed) and
should be kept as such for now.

This patch only contains typing changes and does not change runtime
behaviour.

Broken off from RDFLib#1850
aucampia added a commit to aucampia/rdflib that referenced this pull request Apr 19, 2022
This patch primarily adds more type hints for `rdflib.graph`, but also
adds type hints to some related modules in order to work with the new
type hints for `rdflib.graph`.

I'm mainly doing this as a baseline for adding type hints to
`rdflib.store`.

I have created type aliases to make it easier to type everything
cosnsitently and to make type hints easier easier to change in the
future. The type aliases are private however (i.e. `_`-prefixed) and
should be kept as such for now.

This patch only contains typing changes and does not change runtime
behaviour.

Broken off from RDFLib#1850
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch from 6745ca6 to c3e431c Compare May 7, 2022 20:27
@coveralls
Copy link

coveralls commented May 7, 2022

Coverage Status

Coverage: 90.646% (-0.2%) from 90.84% when pulling b4830ce on aucampia:iwana-20220126T2212-typing into 4ea1436 on RDFLib:main.

@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 3 times, most recently from 5e50fe0 to 3653f9c Compare May 13, 2022 20:15
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch from 3653f9c to 39a98b0 Compare May 21, 2022 14:30
aucampia added a commit to aucampia/rdflib that referenced this pull request May 21, 2022
This patch primarily adds more type hints for `rdflib.graph`, but also
adds type hints to some related modules in order to work with the new
type hints for `rdflib.graph`.

I'm mainly doing this as a baseline for adding type hints to
`rdflib.store`.

I have created type aliases to make it easier to type everything
cosnsitently and to make type hints easier easier to change in the
future. The type aliases are private however (i.e. `_`-prefixed) and
should be kept as such for now.

This patch only contains typing changes and does not change runtime
behaviour.

Broken off from RDFLib#1850
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 5 times, most recently from 1f0a8fc to 0e04399 Compare May 21, 2022 15:52
aucampia added a commit to aucampia/rdflib that referenced this pull request May 21, 2022
This patch primarily adds more type hints for `rdflib.graph`, but also
adds type hints to some related modules in order to work with the new
type hints for `rdflib.graph`.

I'm mainly doing this as a baseline for adding type hints to
`rdflib.store`.

I have created type aliases to make it easier to type everything
cosnsitently and to make type hints easier easier to change in the
future. The type aliases are private however (i.e. `_`-prefixed) and
should be kept as such for now.

This patch only contains typing changes and does not change runtime
behaviour.

Broken off from RDFLib#1850
aucampia added a commit to aucampia/rdflib that referenced this pull request May 25, 2022
This patch primarily adds more type hints for `rdflib.graph`, but also
adds type hints to some related modules in order to work with the new
type hints for `rdflib.graph`.

I'm mainly doing this as a baseline for adding type hints to
`rdflib.store`.

I have created type aliases to make it easier to type everything
cosnsitently and to make type hints easier easier to change in the
future. The type aliases are private however (i.e. `_`-prefixed) and
should be kept as such for now.

This patch only contains typing changes and does not change runtime
behaviour.

Broken off from RDFLib#1850
aucampia added a commit that referenced this pull request May 26, 2022
This patch primarily adds more type hints for `rdflib.graph`, but also
adds type hints to some related modules in order to work with the new
type hints for `rdflib.graph`.

I'm mainly doing this as a baseline for adding type hints to
`rdflib.store`.

I have created type aliases to make it easier to type everything
consistently and to make type hints easier easier to change in the
future. The type aliases are private however (i.e. `_`-prefixed) and
should be kept as such for now.

This patch only contains typing changes and does not change runtime
behavior.

Broken off from #1850
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch from 0e04399 to e44d849 Compare May 26, 2022 12:17
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 2 times, most recently from 8e745e0 to 92f43c3 Compare July 20, 2022 15:04
aucampia added a commit to aucampia/rdflib that referenced this pull request Aug 14, 2022
More or less complete type hints for the rdflib.graph module.

Other changes:
- Improved/simplified type hints in `rdflib.store` and store plugins.
- Add type ignores for various type errors that occur with the type
  hints.

This is split-off from <RDFLib#1850>.
aucampia added a commit to aucampia/rdflib that referenced this pull request Aug 14, 2022
More or less complete type hints for the rdflib.graph module.

Other changes:
- Improved/simplified type hints in `rdflib.store` and store plugins.
- Add type ignores for various type errors that occur with the type
  hints.

This is split-off from <RDFLib#1850>.

This PR does not change runtime behaviour.
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 4 times, most recently from ffb6a1c to 8296775 Compare August 21, 2022 18:56
aucampia added a commit to aucampia/rdflib that referenced this pull request Aug 21, 2022
More or less complete type hints for the rdflib.graph module.

Other changes:
- Improved/simplified type hints in `rdflib.store` and store plugins.
- Add type ignores for various type errors that occur with the type
  hints.

This is split-off from <RDFLib#1850>.

This PR does not change runtime behaviour.
aucampia added a commit to aucampia/rdflib that referenced this pull request Aug 21, 2022
More or less complete type hints for the rdflib.graph module.

Other changes:
- Improved/simplified type hints in `rdflib.store` and store plugins.
- Add type ignores for various type errors that occur with the type
  hints.

This is split-off from <RDFLib#1850>.

This PR does not change runtime behaviour.
aucampia added a commit that referenced this pull request Aug 23, 2022
More or less complete type hints for the rdflib.graph module.

Other changes:
- Improved/simplified type hints in `rdflib.store` and store plugins.
- Add type ignores for various type errors that occur with the type
  hints.

This is split-off from <#1850>.

This PR does not change runtime behaviour.
aucampia added a commit that referenced this pull request Aug 23, 2022
…2094)

More or less complete type hints for `rdflib.plugins.sparql.algebra` and
`rdflib.plugins.sparql.operators`.

This does not change runtime behaviour.

Other changes:
- Fixed line endings of `test/test_issues/test_issue1043.py`
  and `test/test_issues/test_issue910.py`.
- Removed a type hint comment that was present in rdflib/plugins/sparql/algebra.py

This is split-off from #1850.
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 2 times, most recently from bb3775f to 4ccf241 Compare August 24, 2022 19:15
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 5 times, most recently from 40e3b9d to 47ab4f6 Compare March 16, 2023 21:14
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 2 times, most recently from 353ea9b to b4830ce Compare April 12, 2023 20:41
@aucampia aucampia force-pushed the iwana-20220126T2212-typing branch 2 times, most recently from 1f9c8d8 to a78c96d Compare September 10, 2023 13:57
[DO NOT REVIEW] Add a bunch of typing

This is a branch I'm maintaing with a bunch of typing, I'm planning to
integrate it with master in parts, anyone is welcome to have a look but
most of what is happening here is subject to change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants