From 263427f438aa7d3f0bd570f671ecba9299c18968 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Mon, 14 Nov 2022 19:58:45 +0000 Subject: [PATCH] Bump test dependencies; improve `pycln` config (#9197) --- .pre-commit-config.yaml | 4 ++-- CONTRIBUTING.md | 2 +- pyproject.toml | 4 ++++ requirements-tests.txt | 6 +++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index caf463cf7556..f7ff41feaae7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,9 @@ repos: - repo: https://github.com/hadialqattan/pycln - rev: v2.1.1 # must match requirements-tests.txt + rev: v2.1.2 # must match requirements-tests.txt hooks: - id: pycln - args: [--all, stubs, stdlib, tests, scripts] + args: [--config=pyproject.toml, stubs, stdlib, tests, scripts] - repo: https://github.com/psf/black rev: 22.10.0 # must match requirements-tests.txt hooks: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ceba9b87ab07..ec15b95f7566 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,7 +94,7 @@ That being said, if you *want* to run the checks locally when you commit, you're free to do so. Either run `pycln`, `black` and `isort` manually... ``` -pycln --all . +pycln --config=pyproject.toml . isort . black . ``` diff --git a/pyproject.toml b/pyproject.toml index 648db59c57dd..f420aa5cf335 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,3 +55,7 @@ extra_standard_library = [ "opcode", "pyexpat", ] + +[tool.pycln] +all = true +disable_all_dunder_policy = true diff --git a/requirements-tests.txt b/requirements-tests.txt index e84fccd25e21..1aff08721e56 100644 --- a/requirements-tests.txt +++ b/requirements-tests.txt @@ -5,12 +5,12 @@ flake8-bugbear==22.10.27 # must match .pre-commit-config.yaml flake8-noqa==1.2.9 # must match .pre-commit-config.yaml flake8-pyi==22.10.0 # must match .pre-commit-config.yaml isort==5.10.1 # must match .pre-commit-config.yaml -mypy==0.990 +mypy==0.991 packaging==21.3 pathspec -pycln==2.1.1 # must match .pre-commit-config.yaml +pycln==2.1.2 # must match .pre-commit-config.yaml pyyaml==6.0 -pytype==2022.10.26; platform_system != "Windows" and python_version < "3.11" +pytype==2022.11.10; platform_system != "Windows" and python_version < "3.11" termcolor>=2 tomli==2.0.1 tomlkit==0.11.6