-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,77 @@ | ||
exclude: '^$|settings|scripts' | ||
fail_fast: false | ||
repos: | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.1.0 | ||
hooks: | ||
# Disabled because yapf is better for our purpose | ||
# - id: autopep8-wrapper | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-toml | ||
- id: check-vcs-permalinks | ||
- id: debug-statements | ||
- id: fix-byte-order-marker | ||
- id: end-of-file-fixer | ||
exclude: 'static' | ||
- id: fix-encoding-pragma | ||
args: ['--remove'] | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: trailing-whitespace | ||
- id: mixed-line-ending | ||
args: ['--fix=lf'] | ||
|
||
- repo: https://github.com/humitos/mirrors-autoflake.git | ||
rev: v1.1 | ||
hooks: | ||
- id: autoflake | ||
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] | ||
|
||
# TODO: re-enable it and use `--range` to select the modified lines | ||
# - repo: https://github.com/myint/docformatter.git | ||
# rev: v1.4 | ||
# hooks: | ||
# - id: docformatter | ||
# args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline'] | ||
|
||
# TODO: re-enable when we can make it behave in the same way than in CircleCI | ||
# - repo: https://github.com/PyCQA/prospector | ||
# rev: 1.3.1 | ||
# hooks: | ||
# - id: prospector | ||
# args: ['--profile=/home/humitos/rtfd/code/readthedocs.org/prospector.yml'] | ||
# additional_dependencies: [ | ||
# # TODO: use an environment variable to decide this PATH here? | ||
# '-r/home/humitos/rtfd/code/readthedocs.org/requirements/lint.txt', | ||
# ] | ||
# # NOTE: copied from prospector YAML configuration because pre-commit does | ||
# # not load them from there and runs prospector over these files | ||
# exclude: | | ||
# (?x)^( | ||
# docs/.*| | ||
# readthedocs/settings/.*| | ||
# common/.*| | ||
# readthedocs/rtd_tests/.*| | ||
# readthedocs/.*tests.*/.*| | ||
# .*/migrations/.*| | ||
# .*conftest.py | ||
# )$ | ||
|
||
- repo: https://github.com/akaihola/darker | ||
rev: 1.3.2 | ||
hooks: | ||
- id: darker | ||
# TODO: find a way to pass `--check` only when running via `tox -e | ||
# pre-commit` | ||
args: ['--isort'] | ||
additional_dependencies: | ||
- isort==5.10.1 | ||
# darker is not compatible with v22.1.0 | ||
# https://github.com/akaihola/darker/issues/264 | ||
- black==21.12b0 |
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