Last active
May 31, 2024 21:57
-
-
Save woctezuma/b01c6b0ad1616507f93e4c44ef1393f0 to your computer and use it in GitHub Desktop.
Config for pre-commit hooks
This file contains hidden or 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, | |
--preview, | |
--target-version, | |
"py313", | |
--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 hidden or 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 = "py313" | |
unsafe-fixes = true | |
preview = 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