From 3c35a1c7b5e53a29b1536d51445641f703d8e39c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:43:26 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/asottile/pyupgrade: v3.8.0 → v3.14.0](https://github.com/asottile/pyupgrade/compare/v3.8.0...v3.14.0) - https://github.com/ikamensh/flynt/: 0.78 → 1.0.1 - [github.com/psf/black: 23.3.0 → 23.9.1](https://github.com/psf/black/compare/23.3.0...23.9.1) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd10690..79d7f25 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ ci: autoupdate_schedule: quarterly repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.8.0 + rev: v3.14.0 hooks: - id: pyupgrade args: [--py37-plus] @@ -25,13 +25,13 @@ repos: exclude: ^tests/examples/pacer/nef/s3/.*\.txt$ - repo: https://github.com/ikamensh/flynt/ - rev: '0.78' + rev: '1.0.1' hooks: - id: flynt args: [--line-length=79, --transform-concats] - repo: https://github.com/psf/black - rev: 23.3.0 + rev: 23.9.1 hooks: - id: black From 59e549f1c37d6c81236dc0c3d0829abcf8300100 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:44:12 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests.py b/tests.py index a498aef..eca7193 100644 --- a/tests.py +++ b/tests.py @@ -134,12 +134,12 @@ def check_for_matching_groups(self, regexes, examples): self.assertIn( "reporter", m.groupdict(), - " group missing in regex %s" % regex, + f" group missing in regex {regex}", ) self.assertIn( "page", m.groupdict(), - " group missing in regex %s" % regex, + f" group missing in regex {regex}", ) continue @@ -163,7 +163,7 @@ def test_json_format(self): tofile="expected.json", ) self.fail( - ("%s needs reformatting. " % self.json_name) + f"{self.json_name} needs reformatting. " + "Run with env var FIX_JSON=1 to update the file automatically. " + "Diff of actual vs. expected:\n" + "\n".join(diff) @@ -201,7 +201,7 @@ def check_ascii(self, obj): def check_whitespace(self, obj): for s in emit_strings(obj): self.assertEqual( - s.strip(), s, msg="Field needs whitespace stripped: '%s'" % s + s.strip(), s, msg=f"Field needs whitespace stripped: '{s}'" ) non_space_whitespace = any(w != " " for w in re.findall(r"\s+", s)) self.assertFalse( @@ -227,7 +227,7 @@ def test_any_keys_missing_editions(self): self.assertIn( reporter_abbv, reporter_data["editions"], - msg="Could not find edition for key: %s" % reporter_abbv, + msg=f"Could not find edition for key: {reporter_abbv}", ) def test_for_variations_mapping_to_bad_keys(self): @@ -268,7 +268,7 @@ def test_all_reporters_have_valid_cite_type(self): self.assertIn( reporter_data["cite_type"], VALID_CITE_TYPES, - "%s did not have a valid cite_type value" % reporter_abbv, + f"{reporter_abbv} did not have a valid cite_type value", ) def test_no_variation_is_same_as_key(self):