From a93f5f664cd90465f88475bfe9f3b3e90b862dd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 22 May 2020 10:42:26 +0200 Subject: [PATCH] Update pre-commit hooks --- .pre-commit-config.yaml | 15 +++++++++------ tests/test_make_default_setup.py | 12 ++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 059f3fe5..b12b95a7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,17 +3,15 @@ default_language_version: python: python3 repos: - repo: https://github.com/psf/black - rev: 19.3b0 + rev: 19.10b0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.4.0 + rev: v3.1.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: debug-statements - - id: flake8 - additional_dependencies: ["flake8-bugbear==19.8.0"] - id: fix-encoding-pragma - id: check-case-conflict - id: check-docstring-first @@ -23,12 +21,17 @@ repos: - id: check-xml - id: mixed-line-ending args: ["--fix=lf"] +- repo: https://github.com/pycqa/flake8 + rev: 3.8.1 + hooks: + - id: flake8 + additional_dependencies: ["flake8-bugbear==20.1.4"] - repo: https://github.com/asottile/pyupgrade - rev: v1.25.1 + rev: v2.4.3 hooks: - id: pyupgrade - repo: https://github.com/asottile/seed-isort-config - rev: v1.9.3 + rev: v2.1.1 hooks: - id: seed-isort-config - repo: https://github.com/pre-commit/mirrors-isort diff --git a/tests/test_make_default_setup.py b/tests/test_make_default_setup.py index 9bcb76c6..533209ce 100644 --- a/tests/test_make_default_setup.py +++ b/tests/test_make_default_setup.py @@ -18,13 +18,13 @@ class TestMakeDefaultSetup(unittest.TestCase): def _assert_no_diff(self, dc): - def _filter(l): + def _filter(names): return [ - i - for i in l - if not i.endswith(".pyc") - and not i.endswith(".egg-info") - and not i.endswith(".eggs") + name + for name in names + if not name.endswith(".pyc") + and not name.endswith(".egg-info") + and not name.endswith(".eggs") ] if dc.right.endswith("addon4"):