Skip to content

Commit

Permalink
chore: update pre-commit hooks (#112)
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)

* 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 5dcff61 commit fd49549
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
11 changes: 3 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@ 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)

# Check linting and style issues
- 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)

# Changes tabs to spaces
- repo: https://github.com/Lucas-C/pre-commit-hooks
Expand Down
16 changes: 5 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ build-verbosity = 1


[tool.ruff]
select = [
"E", "F", "W", # flake8
src = ["src"]

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PGH", # pygrep-hooks
"PIE", # flake8-pie
Expand All @@ -75,16 +76,9 @@ select = [
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
extend-ignore = [
ignore = [
"PLR", # Design related pylint codes
"E501", # Line too long
]
src = ["src"]
unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
]
flake8-unused-arguments.ignore-variadic-names = true
isort.required-imports = ["from __future__ import annotations"]

[tool.ruff.per-file-ignores]
Expand Down

0 comments on commit fd49549

Please sign in to comment.