Skip to content

Commit 666cc9e

Browse files
committed
Add basic linting rules
1 parent 1280238 commit 666cc9e

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

ruff.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
target-version = "py310"
2+
line-length = 120
3+
4+
[format]
5+
quote-style = "single"
6+
exclude = []
7+
8+
[lint]
9+
select = [
10+
"B", # possible bugs
11+
"BLE", # broad exception
12+
"C4", # comprehensions
13+
"DTZ", # work with datetimes
14+
"E", # code style
15+
"ERA", # commented code
16+
"EXE", # check executables
17+
"F", # misc
18+
"FA", # future annotations
19+
"FBT", # booleans
20+
"FURB", # modernizing
21+
"G", # logging format
22+
"I", # imports
23+
"ICN", # import conventions
24+
"INT", # i18n
25+
"ISC", # stringc concat
26+
"PERF", # perfomance
27+
"PIE", # misc
28+
"PLC", # misc
29+
"PLE", # misc err
30+
"PT", # pytest
31+
"PTH", # pathlib
32+
"PYI", # typing
33+
"RSE", # exc raise
34+
"RUF", # misc
35+
"SLOT", # slots related
36+
"TC", # typing
37+
"UP", # py upgrade
38+
]
39+
40+
ignore = []
41+
42+
43+
[lint.extend-per-file-ignores]
44+
"tests/*" = []
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
target-version = "py310"
2+
line-length = 120
3+
4+
[format]
5+
quote-style = "single"
6+
exclude = []
7+
8+
[lint]
9+
select = [
10+
"B", # possible bugs
11+
"BLE", # broad exception
12+
"C4", # comprehensions
13+
"DTZ", # work with datetimes
14+
"E", # code style
15+
"ERA", # commented code
16+
"EXE", # check executables
17+
"F", # misc
18+
"FA", # future annotations
19+
"FBT", # booleans
20+
"FURB", # modernizing
21+
"G", # logging format
22+
"I", # imports
23+
"ICN", # import conventions
24+
"INT", # i18n
25+
"ISC", # stringc concat
26+
"PERF", # perfomance
27+
"PIE", # misc
28+
"PLC", # misc
29+
"PLE", # misc err
30+
"PT", # pytest
31+
"PTH", # pathlib
32+
"PYI", # typing
33+
"RSE", # exc raise
34+
"RUF", # misc
35+
"SLOT", # slots related
36+
"TC", # typing
37+
"UP", # py upgrade
38+
]
39+
40+
ignore = []
41+
42+
43+
[lint.extend-per-file-ignores]
44+
"tests/*" = []

0 commit comments

Comments
 (0)