Skip to content

Commit

Permalink
chore: replace ruff by isort
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenanht committed Jan 26, 2024
1 parent e5668b5 commit 5b483e1
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
46 changes: 21 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args:
- "--config"
- "pyproject.toml"
- "--fix"
- id: ruff-format
types_or: [python, pyi, jupyter]
args:
- "--config"
- "pyproject.toml"
- repo: https://github.com/pycqa/isort
rev: "5.12.0"
hooks:
- id: isort
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
hooks:
- id: trailing-whitespace
- id: check-yaml
- id: end-of-file-fixer
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
args:
- "--config"
- "pyproject.toml"
- "--fix"
- id: ruff-format
types_or: [python, pyi, jupyter]
args:
- "--config"
- "pyproject.toml"
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ indent-width = 4

# Assume Python 3.9
target-version = "py39"
cache-dir = ".cache/ruff"


[tool.ruff.lint]
Expand All @@ -164,6 +165,9 @@ unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[tool.ruff.lint.pydocstyle]
convention = "numpy"

[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
Expand Down

0 comments on commit 5b483e1

Please sign in to comment.