Skip to content

Commit

Permalink
Fix pre-commit formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kchason committed Aug 26, 2024
1 parent a57cb0c commit 1806ec4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
8 changes: 5 additions & 3 deletions case_utils/case_sparql_construct/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ def main() -> None:

# Configure debug logging before running parse_args, because there could be an error raised before the construction of the argument parser.
logging.basicConfig(
level=logging.DEBUG
if ("--debug" in sys.argv or "-d" in sys.argv)
else logging.INFO
level=(
logging.DEBUG
if ("--debug" in sys.argv or "-d" in sys.argv)
else logging.INFO
)
)

parser.add_argument("-d", "--debug", action="store_true")
Expand Down
8 changes: 5 additions & 3 deletions case_utils/case_sparql_select/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ def main() -> None:

# Configure debug logging before running parse_args, because there could be an error raised before the construction of the argument parser.
logging.basicConfig(
level=logging.DEBUG
if ("--debug" in sys.argv or "-d" in sys.argv)
else logging.INFO
level=(
logging.DEBUG
if ("--debug" in sys.argv or "-d" in sys.argv)
else logging.INFO
)
)

parser.add_argument("-d", "--debug", action="store_true")
Expand Down
24 changes: 13 additions & 11 deletions case_utils/case_validate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ def validate(
)

# Validate data graph against ontology graph.
validate_result: Tuple[
bool, Union[Exception, bytes, str, rdflib.Graph], str
] = pyshacl.validate(
data_graph,
*args,
ont_graph=ontology_graph,
shacl_graph=ontology_graph,
**kwargs,
validate_result: Tuple[bool, Union[Exception, bytes, str, rdflib.Graph], str] = (
pyshacl.validate(
data_graph,
*args,
ont_graph=ontology_graph,
shacl_graph=ontology_graph,
**kwargs,
)
)

# Relieve RAM of the data graph after validation has run.
Expand Down Expand Up @@ -159,9 +159,11 @@ def main() -> None:
# could be an error raised before the construction of the argument
# parser.
logging.basicConfig(
level=logging.DEBUG
if ("--debug" in sys.argv or "-d" in sys.argv)
else logging.INFO
level=(
logging.DEBUG
if ("--debug" in sys.argv or "-d" in sys.argv)
else logging.INFO
)
)

# Add arguments specific to case_validate.
Expand Down

0 comments on commit 1806ec4

Please sign in to comment.