Skip to content

Commit

Permalink
update pre-commit and ruff configurations (#1983)
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Aug 26, 2023
1 parent 72705ac commit 1bf57b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ repos:
- id: check-toml
- id: mixed-line-ending
# Python
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black-jupyter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.285
hooks:
- id: ruff
args: ["--fix"]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.7.0
hooks:
- id: black-jupyter
# numpydoc
- repo: https://github.com/Carreau/velin
rev: 0.0.12
Expand Down
12 changes: 4 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,24 +133,20 @@ omit = ["*test*"]
profile = "black"

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

select = [
"E", # errors
"F", # pyflakes
"D", # pydocstyle
"I", # isort
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
]
ignore = [
"E501", # line too long
"E741", # ambiguous variable name
"E402", # module level import not at top of file
"D413", # missing blank line after last section
"D416", # section name should end with a colon
"D203", # 1 blank line required before class docstring
"D107", # missing docstring in __init__
"D213", # multi-line docstring summary should start at the second line
"D205", # 1 blank line required between summary line and description
]

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

0 comments on commit 1bf57b7

Please sign in to comment.