2021-04-30 11:22:05 +00:00
|
|
|
ci:
|
|
|
|
skip: [pylint]
|
|
|
|
|
2018-09-17 07:15:50 +00:00
|
|
|
repos:
|
2021-04-07 19:42:36 +00:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2021-05-17 17:56:32 +00:00
|
|
|
rev: v4.0.1
|
2021-04-04 08:00:52 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: trailing-whitespace
|
2021-04-04 08:00:52 +00:00
|
|
|
exclude: "tests/functional/t/trailing_whitespaces.py"
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: end-of-file-fixer
|
2021-04-04 08:00:52 +00:00
|
|
|
exclude: "tests/functional/m/missing/missing_final_newline.py|tests/functional/t/trailing_newlines.py"
|
2021-04-07 19:42:36 +00:00
|
|
|
- repo: https://github.com/myint/autoflake
|
2020-09-20 10:11:26 +00:00
|
|
|
rev: v1.4
|
2018-09-17 07:15:50 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: autoflake
|
2020-09-20 10:11:26 +00:00
|
|
|
exclude: &fixtures tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/
|
|
|
|
args:
|
2021-04-07 19:42:36 +00:00
|
|
|
- --in-place
|
|
|
|
- --remove-all-unused-imports
|
|
|
|
- --expand-star-imports
|
|
|
|
- --remove-duplicate-keys
|
|
|
|
- --remove-unused-variables
|
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
2021-07-12 23:54:23 +00:00
|
|
|
rev: v2.21.0
|
2021-02-21 12:20:34 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: pyupgrade
|
2021-02-21 12:20:34 +00:00
|
|
|
args: [--py36-plus]
|
|
|
|
exclude: *fixtures
|
2021-04-07 19:42:36 +00:00
|
|
|
- repo: https://github.com/PyCQA/isort
|
2021-07-12 15:10:02 +00:00
|
|
|
rev: 5.9.2
|
2019-03-09 08:05:14 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: isort
|
2021-05-03 18:07:40 +00:00
|
|
|
- repo: https://github.com/psf/black
|
2021-06-14 08:22:40 +00:00
|
|
|
rev: 21.6b0
|
2020-09-20 10:11:26 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: black
|
|
|
|
args: [--safe, --quiet]
|
|
|
|
exclude: *fixtures
|
|
|
|
- repo: https://github.com/Pierre-Sassoulas/black-disable-checker/
|
2021-05-03 18:07:40 +00:00
|
|
|
rev: 1.0.1
|
2021-03-06 09:16:30 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: black-disable-checker
|
2021-05-03 18:07:40 +00:00
|
|
|
- repo: https://github.com/PyCQA/flake8
|
2021-05-10 10:12:37 +00:00
|
|
|
rev: 3.9.2
|
2021-04-04 08:00:52 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: flake8
|
2021-04-04 08:00:52 +00:00
|
|
|
exclude: *fixtures
|
2021-04-07 19:42:36 +00:00
|
|
|
- repo: local
|
2020-11-14 22:33:51 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: pylint
|
2020-11-14 22:33:51 +00:00
|
|
|
name: pylint
|
|
|
|
entry: pylint
|
|
|
|
language: system
|
|
|
|
types: [python]
|
2021-04-07 19:42:36 +00:00
|
|
|
args:
|
|
|
|
[
|
|
|
|
"-rn",
|
|
|
|
"-sn",
|
|
|
|
"--rcfile=pylintrc",
|
|
|
|
"--load-plugins=pylint.extensions.docparams",
|
|
|
|
]
|
2021-03-07 15:49:57 +00:00
|
|
|
# disabled plugins: pylint.extensions.mccabe
|
2020-12-14 12:48:28 +00:00
|
|
|
exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/|doc/
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: fix-documentation
|
2021-03-05 15:53:02 +00:00
|
|
|
name: Fix documentation
|
|
|
|
entry: python3 -m script.fix_documentation
|
|
|
|
language: system
|
|
|
|
types: [text]
|
|
|
|
files: ^(ChangeLog|doc/whatsnew/\d+\.\d+\.rst)
|
2021-06-30 17:45:06 +00:00
|
|
|
- repo: https://github.com/myint/rstcheck
|
|
|
|
rev: "3f92957478422df87bd730abde66f089cc1ee19b"
|
|
|
|
hooks:
|
|
|
|
- id: rstcheck
|
|
|
|
args: ["--ignore-roles=func,class,mod", "--report=warning"]
|
|
|
|
types: [text] # necessary to include ChangeLog file
|
|
|
|
files: ^(ChangeLog|doc/(.*/)*.*\.rst)
|
2021-04-07 19:42:36 +00:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy
|
2021-06-28 15:44:09 +00:00
|
|
|
rev: v0.910
|
2021-02-06 06:53:19 +00:00
|
|
|
hooks:
|
2021-04-07 19:42:36 +00:00
|
|
|
- id: mypy
|
2021-02-06 06:53:19 +00:00
|
|
|
name: mypy
|
|
|
|
entry: mypy
|
|
|
|
language: python
|
2021-02-14 21:23:24 +00:00
|
|
|
types: [python]
|
2021-06-14 08:20:37 +00:00
|
|
|
args: []
|
2021-02-06 06:53:19 +00:00
|
|
|
require_serial: true
|
2021-06-21 18:58:26 +00:00
|
|
|
additional_dependencies: ["types-pkg_resources==0.1.3", "types-toml==0.1.3"]
|
2021-02-06 06:53:19 +00:00
|
|
|
exclude: tests/functional/|tests/input|tests/extensions/data|tests/regrtest_data/|tests/data/|doc/|bin/
|
2021-04-07 19:42:36 +00:00
|
|
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
2021-06-28 18:38:54 +00:00
|
|
|
rev: v2.3.2
|
2021-04-07 19:42:36 +00:00
|
|
|
hooks:
|
|
|
|
- id: prettier
|
|
|
|
args: [--prose-wrap=always, --print-width=88]
|