Skip to content

Instantly share code, notes, and snippets.

@woctezuma
Last active May 4, 2024 13:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save woctezuma/b01c6b0ad1616507f93e4c44ef1393f0 to your computer and use it in GitHub Desktop.
Save woctezuma/b01c6b0ad1616507f93e4c44ef1393f0 to your computer and use it in GitHub Desktop.
Config for pre-commit hooks
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]
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