Skip to content

Commit

Permalink
Update ruff config (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 authored Nov 10, 2023
1 parent 1507247 commit 8b8f78a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@ repos:
["traitlets>=5.13", "jupyter_server>=2.10", "terminado>=0.17.1"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.4
rev: v0.1.5
hooks:
- id: ruff
types_or: [python, jupyter]
args: ["--fix", "--show-fixes"]
- id: ruff-format
types_or: [python, jupyter]

- repo: https://github.com/scientific-python/cookie
rev: "2023.10.27"
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ nowarn = "test -W default {args}"
detached = true
dependencies = ["pre-commit"]
[tool.hatch.envs.lint.scripts]
build = "pre-commit run --all-files ruff"
build = [
"pre-commit run --all-files ruff",
"pre-commit run --all-files ruff-format"
]

[tool.hatch.envs.typing]
dependencies = [ "pre-commit"]
Expand Down Expand Up @@ -129,7 +132,6 @@ warn_unreachable = true

[tool.ruff]
line-length = 100
target-version = "py38"

[tool.ruff.lint]
select = [
Expand Down

0 comments on commit 8b8f78a

Please sign in to comment.