Skip to content

Commit 6b9e77b

Browse files
committed
Merge branch 'HotFix-run_precommit_autoupdate' into HotFix-sparql-query-result-types
2 parents 5435187 + faac091 commit 6b9e77b

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 22.10.0
3+
rev: 23.1.0
44
hooks:
55
- id: black
66
- repo: https://github.com/pycqa/flake8
7-
rev: 5.0.4
7+
rev: 6.0.0
88
hooks:
99
- id: flake8
1010
- repo: https://github.com/pycqa/isort
11-
rev: 5.10.1
11+
rev: 5.12.0
1212
hooks:
1313
- id: isort
1414
name: isort (python)

case_utils/case_file/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
DEFAULT_PREFIX = "http://example.org/kb/"
4141

42+
4243
# Shortcut syntax for defining an immutable named tuple is noted here:
4344
# https://docs.python.org/3/library/typing.html#typing.NamedTuple
4445
# via the "See also" box here: https://docs.python.org/3/library/collections.html#collections.namedtuple

case_utils/case_sparql_construct/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def main() -> None:
9898
construct_query_result = in_graph.query(construct_query_object)
9999
_logger.debug("type(construct_query_result) = %r." % type(construct_query_result))
100100
_logger.debug("len(construct_query_result) = %d." % len(construct_query_result))
101-
for (row_no, row) in enumerate(construct_query_result):
101+
for row_no, row in enumerate(construct_query_result):
102102
assert isinstance(row, tuple)
103103
if row_no == 0:
104104
_logger.debug("row[0] = %r." % (row,))

case_utils/case_sparql_select/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ def graph_and_query_to_data_frame(
8686
select_query_object = rdflib.plugins.sparql.processor.prepareQuery(
8787
select_query_text, initNs=nsdict
8888
)
89-
for (row_no, row) in enumerate(_graph.query(select_query_object)):
89+
for row_no, row in enumerate(_graph.query(select_query_object)):
9090
assert isinstance(row, rdflib.query.ResultRow)
9191
tally = row_no + 1
9292
record = []
93-
for (column_no, column) in enumerate(row):
93+
for column_no, column in enumerate(row):
9494
if column is None:
9595
column_value = ""
9696
elif isinstance(column, rdflib.term.Literal):

case_utils/ontology/src/ontology_and_version_iris.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828

2929
def concept_is_cdo_concept(n_concept: rdflib.URIRef) -> bool:
3030
"""
31-
This function is purposefully distinct from the function used in case_validate. Within this script, the publishing history of CASE and UCO is reviewed."""
31+
This function is purposefully distinct from the function used in case_validate. Within this script, the publishing history of CASE and UCO is reviewed.
32+
"""
3233
concept_iri = str(n_concept)
3334
return (
3435
concept_iri.startswith("https://ontology.unifiedcyberontology.org/")

tests/case_utils/case_sparql_select/test_data_frame_to_table_text_json.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
)
3737

3838

39-
def make_data_frame_to_json_table_text_parameters() -> typing.Iterator[
40-
typing.Tuple[str, str, bool, bool]
41-
]:
39+
def make_data_frame_to_json_table_text_parameters() -> (
40+
typing.Iterator[typing.Tuple[str, str, bool, bool]]
41+
):
4242
for use_header in [False, True]:
4343
for use_index in [False, True]:
4444
for output_mode in ["csv", "html", "json", "md", "tsv"]:

0 commit comments

Comments
 (0)