diff --git a/.meta.toml b/.meta.toml index a3f5db2b67..55664e368a 100644 --- a/.meta.toml +++ b/.meta.toml @@ -47,9 +47,6 @@ testenv-deps = [ "universal2: MarkupSafe", "universal2: zope.testrunner", ] -additional-envlist = [ - "pre-commit", - ] testenv-commands-pre = [ "{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} buildout:root-directory={toxinidir}", ] @@ -64,27 +61,6 @@ testenv-commands = [ coverage-command = "coverage run {envdir}/bin/alltests {posargs:-vc}" testenv-additional = [ "allowlist_externals = *", - "", - "[testenv:pre-commit]", - "basepython = python3", - "description = This env runs all linters configured in .pre-commit-config.yaml", - "skip_install = true", - "deps =", - " pre-commit", - "commands_pre =", - "commands =", - " pre-commit run --all-files --show-diff-on-failure", - "", - "[testenv:autopep8]", - "basepython = python3.8", - "skip_install = true", - "deps =", - " -cconstraints.txt", - " autopep8", - " docformatter", - "commands =", - " autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/src setup.py", - " docformatter --in-place --recursive {toxinidir}/src setup.py", ] use-flake8 = true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 92867ce3e6..de2984176b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,9 +15,8 @@ repos: - id: pyupgrade args: [--py38-plus] - repo: https://github.com/PyCQA/flake8 - rev: "6.1.0" + rev: "7.1.1" hooks: - id: flake8 additional_dependencies: - - flake8-coding == 1.3.2 - flake8-debugger == 4.1.2 diff --git a/tox.ini b/tox.ini index 9540c355f0..407416a77a 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,6 @@ envlist = py313 docs coverage - pre-commit [testenv] skip_install = true @@ -51,7 +50,7 @@ commands = !universal2: {envdir}/bin/alltests --layer '!Products.PluginIndexes' {posargs:-vc} allowlist_externals = * -[testenv:pre-commit] +[testenv:lint] basepython = python3 description = This env runs all linters configured in .pre-commit-config.yaml skip_install = true @@ -61,17 +60,6 @@ commands_pre = commands = pre-commit run --all-files --show-diff-on-failure -[testenv:autopep8] -basepython = python3.8 -skip_install = true -deps = - -cconstraints.txt - autopep8 - docformatter -commands = - autopep8 --verbose --in-place --recursive --aggressive --aggressive {toxinidir}/src setup.py - docformatter --in-place --recursive {toxinidir}/src setup.py - [testenv:release-check] description = ensure that the distribution is ready to release basepython = python3 @@ -89,30 +77,6 @@ commands = python -m build --sdist --no-isolation twine check dist/* -[testenv:lint] -basepython = python3 -commands_pre = - mkdir -p {toxinidir}/parts/flake8 -allowlist_externals = - mkdir -commands = - isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py - flake8 {toxinidir}/src {toxinidir}/setup.py -deps = - flake8 - isort - # Useful flake8 plugins that are Python and Plone specific: - flake8-coding - flake8-debugger - mccabe - -[testenv:isort-apply] -basepython = python3 -commands_pre = -deps = - isort -commands = - isort {toxinidir}/src {toxinidir}/setup.py [] [testenv:docs] basepython = python3