Skip to content

Commit

Permalink
Merge pull request #266 from ajnelson-nist/fix_two_typos
Browse files Browse the repository at this point in the history
Fix two typos
  • Loading branch information
ashleysommer authored Oct 4, 2024
2 parents c1aad57 + 3b4839a commit b5dd32c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit b5dd32c

Please sign in to comment.