From 3bfbb2468407cc88648f76dedb952c21955186c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sviatoslav=20Sydorenko=20=28=D0=A1=D0=B2=D1=8F=D1=82=D0=BE?= =?UTF-8?q?=D1=81=D0=BB=D0=B0=D0=B2=20=D0=A1=D0=B8=D0=B4=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE=29?= Date: Tue, 2 Jul 2024 18:12:47 +0200 Subject: [PATCH] Stop enforcing flake8 v4.0.1 --- .pre-commit-config.yaml | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2d57b55..8a77e3c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -98,8 +98,7 @@ repos: language_version: python3 - repo: https://github.com/PyCQA/flake8.git - # NOTE: This is kept at v4 for until WPS starts supporting flake v5. - rev: 7.1.0 # enforce-version: 4.0.1 + rev: 7.1.0 hooks: - id: flake8 alias: flake8-only-wps @@ -142,36 +141,4 @@ repos: - --output-format - colorized -- repo: local - hooks: - - id: enforced-flake8-version - name: Verify that enforced flake8 version stays unchanged - description: >- - This is a sanity check and fixer that makes sure that - the `flake8` version in this file remains matching the - corresponding request in the `# enforce-version` comment. - # Using Python here because using - # shell test does not always work in CIs: - entry: >- - python -c 'import pathlib, re, sys; - pre_commit_config = pathlib.Path(sys.argv[1]); - cfg_txt = pre_commit_config.read_text(); - new_cfg_txt = re.sub( - r"(?P\s+)rev:\s(?:\d+\.\d+\.\d+)\s{0,2}" - r"#\senforce-version:\s(?P\d+\.\d+\.\d+)" - r"[ \t\f\v]*", - r"\grev: \g " - r"# enforce-version: \g", - cfg_txt, - ); - cfg_txt != new_cfg_txt and - pre_commit_config.write_text(new_cfg_txt) - ' - pass_filenames: true - language: system - files: >- - ^\.pre-commit-config\.ya?ml$ - types: - - yaml - ...