Skip to content

Commit 8ca2c18

Browse files
authored
Add more lint checks (#6706)
* add more lint checks * fix lint
1 parent 229247f commit 8ca2c18

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ repos:
2929
- id: black
3030

3131
- repo: https://github.com/charliermarsh/ruff-pre-commit
32-
rev: v0.0.207
32+
rev: v0.0.237
3333
hooks:
3434
- id: ruff
3535
args: ["--fix"]

pyproject.toml

+8-6
Original file line numberDiff line numberDiff line change
@@ -146,18 +146,18 @@ dependencies = [
146146
"black[jupyter]==22.10.0",
147147
"mdformat>0.7",
148148
"mdformat-gfm>=0.3.5",
149-
"ruff==0.0.189"
149+
"ruff==0.0.237"
150150
]
151151
detached = true
152152
[tool.hatch.envs.lint.scripts]
153153
style = [
154-
"ruff {args:notebook tests ui-tests}",
154+
"ruff {args:.}",
155155
"black --check --diff {args:.}",
156156
"mdformat --check {args:CHANGELOG.md}"
157157
]
158158
fmt = [
159159
"black {args:.}",
160-
"ruff --fix {args:notebook}",
160+
"ruff --fix {args:.}",
161161
"mdformat {args:CHANGELOG.md}"
162162
]
163163

@@ -252,8 +252,9 @@ skip-string-normalization = true
252252
target-version = "py37"
253253
line-length = 100
254254
select = [
255-
"A", "B", "C", "E", "F", "FBT", "I", "N", "Q", "RUF", "S", "T",
256-
"UP", "W", "YTT",
255+
"A", "B", "C", "DTZ", "E", "EM", "F", "FBT", "I", "ICN", "ISC", "N",
256+
"PLC", "PLE", "PLR", "PLW", "Q", "RUF", "S", "SIM", "T", "TID", "UP",
257+
"W", "YTT",
257258
]
258259
ignore = [
259260
# Q000 Single quotes found but double quotes preferred
@@ -267,7 +268,8 @@ ignore = [
267268
[tool.ruff.per-file-ignores]
268269
# S101 Use of `assert` detected
269270
# F841 Local variable `foo` is assigned to but never used
270-
"tests/*" = ["S101", "F841"]
271+
# PLR2004 Magic value used in comparison
272+
"tests/*" = ["S101", "F841", "PLR2004"]
271273

272274
[tool.interrogate]
273275
ignore-init-module=true

0 commit comments

Comments
 (0)