diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c952e8e..a65fd04 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ repos: - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.12.0 hooks: - id: black - repo: https://github.com/pycqa/flake8 - rev: 4.0.1 + rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/pycqa/isort - rev: 5.10.1 + rev: 5.13.2 hooks: - id: isort name: isort (python) diff --git a/case_utils/case_file/__init__.py b/case_utils/case_file/__init__.py index e131b2f..2eb4f95 100644 --- a/case_utils/case_file/__init__.py +++ b/case_utils/case_file/__init__.py @@ -39,6 +39,7 @@ DEFAULT_PREFIX = "http://example.org/kb/" + # Shortcut syntax for defining an immutable named tuple is noted here: # https://docs.python.org/3/library/typing.html#typing.NamedTuple # via the "See also" box here: https://docs.python.org/3/library/collections.html#collections.namedtuple diff --git a/case_utils/case_sparql_construct/__init__.py b/case_utils/case_sparql_construct/__init__.py index eb9610f..a96f06b 100644 --- a/case_utils/case_sparql_construct/__init__.py +++ b/case_utils/case_sparql_construct/__init__.py @@ -98,7 +98,7 @@ def main() -> None: construct_query_result = in_graph.query(construct_query_object) _logger.debug("type(construct_query_result) = %r." % type(construct_query_result)) _logger.debug("len(construct_query_result) = %d." % len(construct_query_result)) - for (row_no, row) in enumerate(construct_query_result): + for row_no, row in enumerate(construct_query_result): if row_no == 0: _logger.debug("row[0] = %r." % (row,)) out_graph.add(row) diff --git a/case_utils/case_sparql_select/__init__.py b/case_utils/case_sparql_select/__init__.py index a2023bf..87e2b50 100644 --- a/case_utils/case_sparql_select/__init__.py +++ b/case_utils/case_sparql_select/__init__.py @@ -110,10 +110,10 @@ def main() -> None: select_query_object = rdflib.plugins.sparql.prepareQuery( select_query_text, initNs=nsdict ) - for (row_no, row) in enumerate(graph.query(select_query_object)): + for row_no, row in enumerate(graph.query(select_query_object)): tally = row_no + 1 record = [] - for (column_no, column) in enumerate(row): + for column_no, column in enumerate(row): if column is None: column_value = "" elif (