Skip to content

Commit

Permalink
Update pre-commit hooks; leave more work for ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
ml31415 committed May 2, 2024
1 parent 4e20ed5 commit fb1afa2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 31 deletions.
31 changes: 9 additions & 22 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ repos:
rev: v4.5.0
hooks:
- id: forbid-new-submodules
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
- id: detect-private-key
- id: check-builtin-literals
Expand All @@ -22,6 +18,12 @@ repos:
- id: check-yaml
exclude: (.pre-commit-config\.yaml)

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2']

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
Expand All @@ -30,29 +32,14 @@ repos:
additional_dependencies:
- tomli

- repo: https://github.com/psf/black
rev: 23.12.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.13.1
hooks:
- id: isort

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: [msgspec, types-requests]

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.8
rev: v0.4.2
hooks:
- id: ruff

- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2']
- id: ruff-format
19 changes: 10 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ requests = "^2.20"
[tool.poetry.group.dev.dependencies]
twine = "^4.0.2"

[tool.black]
line-length = 120

[tool.isort]
profile = "black"
line_length = 120
lines_after_imports = 2
combine_as_imports = true

[tool.codespell]
skip = "*.bz2,*.json,*.xml,poetry.lock"
ignore-regex = ".*codespell-ignore$"
Expand All @@ -85,6 +76,16 @@ check_untyped_defs = true
fix = false
line-length = 120
lint.extend-select = ["UP"]
lint.isort.lines-after-imports = 2

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]

[tool.black]
line-length = 120

[tool.isort]
profile = "black"
line_length = 120
lines_after_imports = 2
combine_as_imports = true

0 comments on commit fb1afa2

Please sign in to comment.