From ec502da984b12668d4bbff17f232b1cbfd27462b Mon Sep 17 00:00:00 2001 From: s-weigand Date: Mon, 7 Nov 2022 03:06:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20yesqa=20by=20moving=20coun?= =?UTF-8?q?t=20from=20the=20config=20to=20the=20hook=20args?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using count yesqa crashes due to tuple unpacking when splitting on '\t' --- .pre-commit-config.yaml | 3 +++ tox.ini | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0775328ad..77eb39823 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -97,6 +97,8 @@ repos: types_or: [python, pyi] additional_dependencies: [flake8-pyi, flake8-comprehensions, flake8-print>=5.0.0] + args: + - "--count" - repo: https://github.com/PyCQA/flake8 rev: 5.0.4 @@ -105,6 +107,7 @@ repos: alias: flake8-docs args: - "--select=D,DAR" + - "--count" name: "flake8 lint docstrings" exclude: "docs|setup.py|tests?/|glotaran/builtin/megacomplexes|glotaran/cli|benchmark|glotaran/builtin/io/ascii" additional_dependencies: [flake8-docstrings, darglint==1.8.0] diff --git a/tox.ini b/tox.ini index 550fc1dd2..40f489da6 100644 --- a/tox.ini +++ b/tox.ini @@ -20,7 +20,6 @@ envlist = py{38,39,310}, pre-commit, docs, docs-notebooks, docs-links [flake8] -count = True ; D414 is needed due to a bug in pydocstyle the sees the returntype `Parameters` as section extend-ignore = E231, E203, D414 max-line-length = 99