Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 84fc5b7

Browse filesBrowse files
DimitriPapadopouloseffigies
authored andcommitted
STY: Enforce ruff rules
Disable some rules and postpone fixes.
1 parent 89e390e commit 84fc5b7
Copy full SHA for 84fc5b7

File tree

2 files changed

+88
-0
lines changed
Filter options

2 files changed

+88
-0
lines changed

‎.pre-commit-config.yaml

Copy file name to clipboardExpand all lines: .pre-commit-config.yaml
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ repos:
1212
rev: 24.2.0
1313
hooks:
1414
- id: black
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
rev: v0.6.9
17+
hooks:
18+
- id: ruff
19+
args: ["--fix", "--show-source"]
1520
- repo: https://github.com/codespell-project/codespell
1621
rev: v2.2.6
1722
hooks:

‎pyproject.toml

Copy file name to clipboardExpand all lines: pyproject.toml
+83Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,86 @@ build-backend = "setuptools.build_meta"
44

55
[tool.black]
66
skip-string-normalization = true
7+
8+
[tool.ruff]
9+
line-length = 88 # same as black
10+
11+
[tool.ruff.lint]
12+
extend-select = [
13+
"B",
14+
"C4",
15+
"FLY",
16+
"FURB",
17+
"PERF",
18+
"PGH",
19+
"PIE",
20+
"PLE",
21+
"PT",
22+
"PYI",
23+
"Q",
24+
"RSE",
25+
"RUF",
26+
"UP",
27+
]
28+
ignore = [
29+
"B006", # requires annotations
30+
"B011",
31+
"B017", # TODO: enable rule
32+
"B020", # TODO: enable rule
33+
"B028",
34+
"B904",
35+
"C401",
36+
"C408",
37+
"C420", # TODO: enable rule
38+
"E402",
39+
"E722",
40+
"E731", # TODO: enable rule
41+
"F401",
42+
"F403",
43+
"F811",
44+
"F841",
45+
"FURB101",
46+
"FURB103",
47+
"FURB113",
48+
"FURB118", # TODO: enable rule
49+
"FURB140", # TODO: enable rule
50+
"FURB171", # TODO: enable rule
51+
"PGH003", # TODO: enable rule
52+
"PGH004", # TODO: enable rule
53+
"PERF203",
54+
"PIE790",
55+
"PIE794",
56+
"PT001",
57+
"PT004", # deprecated
58+
"PT005", # deprecated
59+
"PT011",
60+
"PT015", # TODO: enable rule
61+
"PT017", # TODO: enable rule
62+
"PT018",
63+
"PT019", # TODO: enable rule
64+
"PT021", # TODO: enable rule
65+
"PYI024",
66+
"RUF002",
67+
"RUF005",
68+
"RUF012", # requires annotations
69+
"RUF015",
70+
"UP027", # deprecated
71+
"UP031", # TODO: enable rule
72+
"UP032", # TODO: enable rule
73+
"UP038", # https://github.com/astral-sh/ruff/issues/7871
74+
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
75+
"W191",
76+
"E111",
77+
"E114",
78+
"E117",
79+
"D206",
80+
"D300",
81+
"Q000",
82+
"Q001",
83+
"Q002",
84+
"Q003",
85+
"COM812",
86+
"COM819",
87+
"ISC001",
88+
"ISC002",
89+
]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.