Type clone.py node functions#230
Merged
ashleysommer merged 8 commits intoRDFLib:masterfrom Jun 1, 2024
Merged
Conversation
This patch also removes the `dataclass` symbol import, as linting reported it is no longer directly used in this module. Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Contributor
Author
|
@ashleysommer : Thank you for merging #228 . In case the PR ordering was confusing: This PR was meant to be reviewable and/or mergeable independent of #229 . |
pyshacl/rdfutil/load.py
Outdated
| """ | ||
| source_is_graph = False | ||
| open_source: Optional[BufferedIOBase] = None | ||
| open_source: Optional[Union[BufferedIOBase, BinaryIO]] = None |
Collaborator
There was a problem hiding this comment.
What is the purpose of BinaryIO in here?
I added the cast in the previous release specifically to avoid the use of BinaryIO in load.py.
Contributor
Author
There was a problem hiding this comment.
I added BinaryIO per a suggestion from make type-check. There was still a type influence from an open(..., 'rb') call. With your note on using cast to avoid BinaryIO, I've pushed another patch to revert the BinaryIO addition.
This uses `cast()` in line with a prior revision to `load.py`. Reported-by: Ashley Sommer <ashleysommer@gmail.com> Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request adds type annotations to functions in
clone.pynot affected by PR 229.This PR builds on PR 228.