Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
gtfierro committed Nov 11, 2024
1 parent 9cd0055 commit 2860d7f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions buildingmotif/dataclasses/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ def from_validation_report(cls, report: Graph) -> List["PathClassCount"]:
def reason(self) -> str:
"""Human-readable explanation of this GraphDiff."""
# interpret a SHACL property path as a sparql property path
path = shacl_path_to_sparql_path(self.graph, self.path, prefixes=dict(self.graph.namespaces()))
path = shacl_path_to_sparql_path(
self.graph, self.path, prefixes=dict(self.graph.namespaces())
)

classname = self.graph.qname(self.classname)
if self.maxc is None and self.minc is not None:
Expand Down Expand Up @@ -377,7 +379,9 @@ def from_validation_report(cls, report: Graph) -> List["RequiredPath"]:

def reason(self) -> str:
"""Human-readable explanation of this GraphDiff."""
path = shacl_path_to_sparql_path(self.graph, self.path, prefixes=dict(self.graph.namespaces()))
path = shacl_path_to_sparql_path(
self.graph, self.path, prefixes=dict(self.graph.namespaces())
)
if self.maxc is None and self.minc is not None:
return f"{self.focus} needs at least {self.minc} uses of path {path}"
if self.minc is None and self.maxc is not None:
Expand Down

0 comments on commit 2860d7f

Please sign in to comment.