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

Fix two typos #266

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyshacl/constraints/core/other_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ClosedConstraintComponent(ConstraintComponent):
"""
The RDF data model offers a huge amount of flexibility. Any node can in principle have values for any property. However, in some cases it makes sense to specify conditions on which properties can be applied to nodes. The SHACL Core language includes a property called sh:closed that can be used to specify the condition that each value node has values only for those properties that have been explicitly enumerated via the property shapes specified for the shape via sh:property.
Link:
https://www.w3.org/TR/shacl/#InConstraintComponent
https://www.w3.org/TR/shacl/#ClosedConstraintComponent
Textual Definition:
If $closed is true then there is a validation result for each triple that has a value node as its subject and a predicate that is not explicitly enumerated as a value of sh:path in any of the property shapes declared via sh:property at the current shape. If $ignoredProperties has a value then the properties enumerated as members of this SHACL list are also permitted for the value node. The validation result MUST have the predicate of the triple as its sh:resultPath, and the object of the triple as its sh:value.
"""
Expand Down
6 changes: 3 additions & 3 deletions pyshacl/constraints/core/string_based_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,15 +392,15 @@ def _evaluate_string_rule(self, r, target_graph, f_v_dict):
try:
if not isinstance(lang_in, rdflib.Literal) or not isinstance(lang_in.value, str):
raise ReportableRuntimeError(
"All languages in sh:LanugageIn must be a Literal with type xsd:string"
"All languages in sh:lanugageIn must be a Literal with type xsd:string"
)
except (AssertionError, AttributeError):
raise ReportableRuntimeError(
"All languages in sh:LanugageIn must be a Literal with type xsd:string"
"All languages in sh:lanugageIn must be a Literal with type xsd:string"
)
languages_need.add(str(lang_in.value).lower())
except (KeyError, AttributeError, ValueError):
raise ReportableRuntimeError("Value of sh:LanguageIn must be a RDF List")
raise ReportableRuntimeError("Value of sh:languageIn must be a RDF List")
wildcard = False
if '*' in languages_need:
wildcard = True
Expand Down