Last active
May 4, 2024 13:07
-
-
Save woctezuma/b01c6b0ad1616507f93e4c44ef1393f0 to your computer and use it in GitHub Desktop.
Config for pre-commit hooks
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
files: \.(py|json)$ | |
default_stages: [commit, manual] | |
repos: | |
- repo: https://github.com/astral-sh/ruff-pre-commit | |
rev: v0.3.4 | |
hooks: | |
- id: ruff | |
args: | |
[ | |
--fix, | |
--unsafe-fixes, | |
--exit-non-zero-on-fix, | |
--target-version, | |
"py312", | |
--select, | |
"ALL", | |
--ignore, | |
"ANN,C90,D,E501,FBT,PLR091,S101,S113,T20", | |
] | |
- id: ruff-format | |
- repo: https://github.com/pre-commit/mirrors-mypy | |
rev: v1.9.0 | |
hooks: | |
- id: mypy | |
additional_dependencies: [types-requests] | |
stages: [manual] | |
- repo: https://github.com/dosisod/refurb | |
rev: v2.0.0 | |
hooks: | |
- id: refurb | |
args: [--python-version, "3.12"] | |
stages: [manual] | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v4.5.0 | |
hooks: | |
- id: pretty-format-json | |
args: [--autofix, --no-ensure-ascii] |
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
target-version = "py312" | |
unsafe-fixes = true | |
[lint] | |
select = ["ALL"] | |
ignore = ["T201", "D"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment