diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a9ea34..7d3e3d2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: check-github-workflows - id: check-dependabot - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/PyCQA/flake8 diff --git a/src/texthooks/_recorders.py b/src/texthooks/_recorders.py index 65d185d..ae4b17a 100644 --- a/src/texthooks/_recorders.py +++ b/src/texthooks/_recorders.py @@ -59,9 +59,9 @@ def __init__(self, verbosity: int): # in py3.6+ the dict builtin maintains order, but being explicit is # slightly safer since we're being explicit about the fact that we want # to retain key order - self.by_fname: t.MutableMapping[ - str, t.List[t.Tuple[str, str, int]] - ] = collections.OrderedDict() + self.by_fname: t.MutableMapping[str, t.List[t.Tuple[str, str, int]]] = ( + collections.OrderedDict() + ) self._file_encoding = _determine_encoding() def add(self, fname, original, updated, lineno): @@ -143,9 +143,9 @@ def print_changes( class CheckRecorder: def __init__(self, verbosity: int): self._printer = _VPrinter(verbosity) - self.by_fname: t.MutableMapping[ - str, t.List[t.Tuple[str, str, int]] - ] = collections.OrderedDict() + self.by_fname: t.MutableMapping[str, t.List[t.Tuple[str, str, int]]] = ( + collections.OrderedDict() + ) self._file_encoding = _determine_encoding() def add(self, fname, lineno): diff --git a/src/texthooks/macro_expand.py b/src/texthooks/macro_expand.py index e6a8380..2c8b657 100644 --- a/src/texthooks/macro_expand.py +++ b/src/texthooks/macro_expand.py @@ -14,6 +14,7 @@ --macro 'issue:' '[texthooks#$VALUE](https://github.com/sirosen/texthooks/issues/$VALUE)' """ # noqa: E501 + import re from ._common import all_filenames, parse_cli_args