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

Type Constraint initializers #265

Merged

Conversation

ajnelson-nist
Copy link
Contributor

I expect there will be some discussion and/or revision on error handling style. Feedback and/or pushed revisions welcome.

This first mostly-mechanically implemented pass didn't type `__init__`
for these classes, because of extra signature review becoming entailed:

* `ClosedConstraintComponent`
* `InConstraintComponent`
* `StringBasedConstraintBase`

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Note: A revision away from an inlined iterator is due to a difference
between pySHACL's RDFNode and RDFLib's Node.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Note: A revision away from `IdentifiedNode` is due to `URIRef` and
`BNode` providing `.n3()`, while the parent class `IdentifiedNode` does
not.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
Note: Extra type assertions are entered because broader type in
`StringBasedConstraintBase` can't be narrowed in child classes.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
@ajnelson-nist ajnelson-nist marked this pull request as ready for review October 4, 2024 19:58
@ajnelson-nist
Copy link
Contributor Author

This PR is ready for review.

@ashleysommer ashleysommer merged commit c1aad57 into RDFLib:master Oct 4, 2024
5 checks passed
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.

2 participants