From b0a41a8381a8d6248d1d25e36f2526549e60044c Mon Sep 17 00:00:00 2001 From: karlch Date: Wed, 12 Jul 2023 20:12:59 +0200 Subject: [PATCH 1/2] CI: Replace pycodestyle with black --- misc/requirements/requirements_lint.txt | 2 +- tox.ini | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/misc/requirements/requirements_lint.txt b/misc/requirements/requirements_lint.txt index 8814e0bb2..b00838dbf 100644 --- a/misc/requirements/requirements_lint.txt +++ b/misc/requirements/requirements_lint.txt @@ -1,3 +1,3 @@ pylint==2.17.4 -pycodestyle==2.10.0 +black==23.7.0 pydocstyle==6.3.0 diff --git a/tox.ini b/tox.ini index f32197fc8..1b40cad69 100644 --- a/tox.ini +++ b/tox.ini @@ -32,7 +32,7 @@ deps = commands = pylint vimiv scripts/pylint_checkers {toxinidir}/scripts/lint_tests.py tests - pycodestyle vimiv tests scripts/pylint_checkers + black --check --diff vimiv tests scripts/pylint_checkers pydocstyle vimiv scripts/pylint_checkers allowlist_externals = {toxinidir}/scripts/lint_tests.py @@ -81,14 +81,6 @@ commands = {toxinidir}/scripts/src2rst.py sphinx-build -b man docs misc -# Settings for pycodestyle -[pycodestyle] -max-line-length = 88 -# E203: whitespace before ':' wrongly raised for slicing -# E501: line too long checked by pylint -# W503: line break before binary operator does not conform to pep8 -ignore = E203,E501,W503 - # Settings for check-manifest [check-manifest] ignore = From ee4d0f00a05a3f6692998aacb9443ed1538c8c6e Mon Sep 17 00:00:00 2001 From: karlch Date: Wed, 12 Jul 2023 20:21:17 +0200 Subject: [PATCH 2/2] Fix remaining black formatting issues --- tests/unit/utils/test_utils.py | 2 -- tox.ini | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index 021eeaf62..3a4e9f23c 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -23,7 +23,6 @@ def cached_method_cls(mocker): """Fixture to retrieve a class with mock utilities and a cached method.""" class CachedMethodCls: - RESULT = 42 def __init__(self): @@ -143,7 +142,6 @@ def test_parameter_names(function): @pytest.mark.parametrize("type_hint", ("int", int)) def test_slot(type_hint): class Dummy(QObject): - signal = pyqtSignal(int) def __init__(self): diff --git a/tox.ini b/tox.ini index 1b40cad69..21cfce71f 100644 --- a/tox.ini +++ b/tox.ini @@ -32,7 +32,7 @@ deps = commands = pylint vimiv scripts/pylint_checkers {toxinidir}/scripts/lint_tests.py tests - black --check --diff vimiv tests scripts/pylint_checkers + black --check --diff --exclude ".*syntax_error.*" vimiv tests scripts/pylint_checkers pydocstyle vimiv scripts/pylint_checkers allowlist_externals = {toxinidir}/scripts/lint_tests.py