-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref #2421 Fix #2908 Updates older pre-commit hooks (initial exp: #680), mostly based (again) on [tox configs](https://github.com/tox-dev/tox/blob/main/.pre-commit-config.yaml) Use ruff instead of pyupgrade/isort/black/flake8 This PR has a couple of commits: the first ones update configs, the last one runs `tox -e fix_lint` to apply pre-commit. Mostly looking into updating the first commits without breaking tests on the last commit.
- Loading branch information
Showing
152 changed files
with
26,467 additions
and
16,243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,26 @@ | ||
default_language_version: | ||
python: python3 | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: check-ast | ||
# - id: check-builtin-literals | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: debug-statements | ||
# - id: end-of-file-fixer | ||
# exclude: 'tests/test-data' | ||
# - id: trailing-whitespace | ||
# exclude: 'tests/test-data' | ||
#- repo: https://github.com/asottile/pyupgrade | ||
# rev: v2.7.2 | ||
# hooks: | ||
# - id: pyupgrade | ||
#- repo: https://github.com/pre-commit/mirrors-isort | ||
# rev: v5.4.2 | ||
# hooks: | ||
# - id: isort | ||
# additional_dependencies: [toml] | ||
|
||
# format using black | ||
# when the full codebase is black, use it directly; | ||
# while it isn't, let's use darker to format new/changed code | ||
- repo: https://github.com/akaihola/darker | ||
rev: 1.7.1 | ||
hooks: | ||
- id: darker | ||
#- repo: https://github.com/psf/black | ||
# rev: 20.8b1 | ||
# hooks: | ||
# - id: black | ||
# args: | ||
# - --safe | ||
# language_version: python3.8 | ||
#- repo: https://github.com/asottile/blacken-docs | ||
# rev: v1.8.0 | ||
# hooks: | ||
# - id: blacken-docs | ||
# additional_dependencies: | ||
# - black==19.10b0 | ||
# language_version: python3.8 | ||
|
||
#- repo: https://github.com/asottile/add-trailing-comma | ||
# rev: v2.0.1 | ||
# hooks: | ||
# - id: add-trailing-comma | ||
#- repo: https://github.com/pre-commit/pygrep-hooks | ||
# rev: v1.6.0 | ||
# hooks: | ||
# - id: rst-backticks | ||
#- repo: https://github.com/asottile/setup-cfg-fmt | ||
# rev: v1.11.0 | ||
# hooks: | ||
# - id: setup-cfg-fmt | ||
# args: | ||
# - --min-py3-version | ||
# - '3.7' | ||
#- repo: https://gitlab.com/pycqa/flake8 | ||
# rev: 3.8.3 | ||
# hooks: | ||
# - id: flake8 | ||
# additional_dependencies: | ||
# - flake8-bugbear == 20.1.2 | ||
# language_version: python3.8 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-docstring-first | ||
- id: check-merge-conflict | ||
- id: check-yaml | ||
- id: check-toml | ||
- id: debug-statements | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.2.0 | ||
hooks: | ||
- id: ruff-format | ||
- id: ruff | ||
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"] | ||
- repo: https://github.com/tox-dev/tox-ini-fmt | ||
rev: "0.5.2" | ||
hooks: | ||
- id: tox-ini-fmt | ||
args: ["-p", "fix_lint"] | ||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.