diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8568dbc..f012a90 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -81,10 +81,10 @@ repos: rev: 7.0.0 hooks: - id: flake8 - alias: flake8-no-wps - name: flake8 WPS-excluded args: - --ignore + # NOTE: WPS326: Found implicit string concatenation + # NOTE: WPS332: Found walrus operator - >- D100, D101, @@ -92,22 +92,6 @@ repos: D107, E402, E501, - additional_dependencies: - - flake8-2020 ~= 1.7.0 - - flake8-pytest-style ~= 1.6.0 - -- repo: https://github.com/PyCQA/flake8.git - # NOTE: This is kept at v4 for until WPS starts supporting flake v5. - rev: 4.0.1 # enforce-version: 4.0.1 - hooks: - - id: flake8 - alias: flake8-only-wps - name: flake8 WPS-only - args: - - --ignore - # NOTE: WPS326: Found implicit string concatenation - # NOTE: WPS332: Found walrus operator - - >- WPS102, WPS110, WPS111, @@ -124,9 +108,9 @@ repos: WPS440, WPS441, WPS453, - - --select - - WPS additional_dependencies: + - flake8-2020 ~= 1.7.0 + - flake8-pytest-style ~= 1.6.0 - wemake-python-styleguide ~= 0.19.0 - repo: https://github.com/PyCQA/pylint.git @@ -149,36 +133,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 - ...