Update pre-commit

Also:

* Configure flake8 to ignore formatting-related problems (let black worry about them).
* Fix reference to Python 3.10 in CI,

Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
Thomas Grainger
2022-11-05 14:58:57 +00:00
committed by GitHub
parent e232b7886a
commit 59457cc1bd
3 changed files with 9 additions and 7 deletions

View File

@@ -31,7 +31,7 @@ jobs:
- tox_env: "py39-pytestlatest" - tox_env: "py39-pytestlatest"
python: "3.9" python: "3.9"
- tox_env: "py310-pytestlatest" - tox_env: "py310-pytestlatest"
python: "3.10-dev" python: "3.10"
- tox_env: "py38-pytestmain" - tox_env: "py38-pytestmain"
python: "3.8" python: "3.8"
- tox_env: "py38-psutil" - tox_env: "py38-psutil"

View File

@@ -1,11 +1,11 @@
repos: repos:
- repo: https://github.com/PyCQA/autoflake - repo: https://github.com/PyCQA/autoflake
rev: v1.7.6 rev: v1.7.7
hooks: hooks:
- id: autoflake - id: autoflake
args: ["--in-place", "--remove-unused-variables", "--remove-all-unused-imports"] args: ["--in-place", "--remove-unused-variables", "--remove-all-unused-imports"]
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 22.3.0 rev: 22.10.0
hooks: hooks:
- id: black - id: black
args: [--safe, --quiet, --target-version, py35] args: [--safe, --quiet, --target-version, py35]
@@ -15,18 +15,18 @@ repos:
- id: blacken-docs - id: blacken-docs
additional_dependencies: [black==20.8b1] additional_dependencies: [black==20.8b1]
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0 rev: v4.3.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: check-yaml - id: check-yaml
- id: debug-statements - id: debug-statements
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 4.0.1 rev: 5.0.4
hooks: hooks:
- id: flake8 - id: flake8
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v2.32.1 rev: v3.2.0
hooks: hooks:
- id: pyupgrade - id: pyupgrade
args: [--py3-plus] args: [--py3-plus]
@@ -39,7 +39,7 @@ repos:
language: python language: python
additional_dependencies: [pygments, restructuredtext_lint] additional_dependencies: [pygments, restructuredtext_lint]
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.960 rev: v0.982
hooks: hooks:
- id: mypy - id: mypy
files: ^(src/|testing/) files: ^(src/|testing/)

View File

@@ -60,6 +60,8 @@ psutil = psutil>=3.0
setproctitle = setproctitle setproctitle = setproctitle
[flake8] [flake8]
# Ignore any errors related to formatting, let black worry/fix them.
ignore = E501, W503, E203
max-line-length = 100 max-line-length = 100
[mypy] [mypy]