Skip to content

Commit

Permalink
Run and apply pre-commit autoupdate
Browse files Browse the repository at this point in the history
No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
  • Loading branch information
ajnelson-nist committed Nov 14, 2024
1 parent d5c8299 commit 87d2d6e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
Expand Down
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 87d2d6e

Please sign in to comment.