-
Notifications
You must be signed in to change notification settings - Fork 64
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
Type clone.py node functions #230
Type clone.py node functions #230
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 <[email protected]>
Signed-off-by: Alex Nelson <[email protected]>
Signed-off-by: Alex Nelson <[email protected]>
Signed-off-by: Alex Nelson <[email protected]>
Signed-off-by: Alex Nelson <[email protected]>
Signed-off-by: Alex Nelson <[email protected]>
Signed-off-by: Alex Nelson <[email protected]>
@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
@@ -139,7 +139,7 @@ def load_from_source( | |||
:return: | |||
""" | |||
source_is_graph = False | |||
open_source: Optional[BufferedIOBase] = None | |||
open_source: Optional[Union[BufferedIOBase, BinaryIO]] = None |
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.
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
.
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.
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 <[email protected]> Signed-off-by: Alex Nelson <[email protected]>
This pull request adds type annotations to functions in
clone.py
not affected by PR 229.This PR builds on PR 228.