Skip to content

Commit

Permalink
chore: update pre-commit hooks (#159)
Browse files Browse the repository at this point in the history
* chore: update pre-commit hooks

updates:
- [github.com/psf/black-pre-commit-mirror: 23.9.1 → 23.10.1](psf/black-pre-commit-mirror@23.9.1...23.10.1)
- [github.com/astral-sh/ruff-pre-commit: v0.1.0 → v0.1.3](astral-sh/ruff-pre-commit@v0.1.0...v0.1.3)
- [github.com/pre-commit/mirrors-mypy: v1.6.0 → v1.6.1](pre-commit/mirrors-mypy@v1.6.0...v1.6.1)

* chore: move to ruff-format

Signed-off-by: Henry Schreiner <[email protected]>

---------

Signed-off-by: Henry Schreiner <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and henryiii authored Oct 30, 2023
1 parent e29e2cb commit a566184
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
13 changes: 4 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,17 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace

# Black, the code formatter, natively supports pre-commit
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
exclude: ^(docs)

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.0"
rev: "v0.1.3"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
exclude: ^(docs)

# Checking static types
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.6.0"
rev: "v1.6.1"
hooks:
- id: mypy
files: "setup.py"
Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,13 @@ test-skip = ["*universal2:arm64"]
before-build = "rm -rf {project}/build"

[tool.ruff]
target-version = "py37"

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"B904",
"I", # isort
"PGH", # pygrep-hooks
"RUF", # Ruff-specific
"UP", # pyupgrade
]
extend-ignore = [
"E501", # Line too long
]
target-version = "py37"

0 comments on commit a566184

Please sign in to comment.