Skip to content

Commit 3fae549

Browse files
committed
chore(lint)
update tests add a number of error tests (E) to make it more like the flake8 whitespace and format checks. Also untabify file. Use spaces.
1 parent 4f9e25a commit 3fae549

File tree

1 file changed

+34
-26
lines changed

1 file changed

+34
-26
lines changed

pyproject.toml

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,43 @@ exclude = [
3838
]
3939

4040
[tool.ruff.lint]
41+
preview = true
42+
explicit-preview-rules = true
43+
4144
select = [
4245
"A", # flake-8-builtins shadowing a builtin
43-
"ARG", # flake8-unused-arguments
44-
"B", # flake8-bugbear
45-
"C4", # flake8-comprehensions
46-
"C901", # McCabe complexity
47-
"COM", # flake8-commas
48-
"E",
49-
"F", # pyflakes
50-
"G", # logging format _(.... % ...) bad use _(...) % ...
46+
"ARG", # flake8-unused-arguments
47+
"B", # flake8-bugbear
48+
"C4", # flake8-comprehensions
49+
"C901", # McCabe complexity
50+
"COM", # flake8-commas
51+
"E", # errors
52+
# enable preview rules:
53+
# Error rules indentation
54+
"E111", "E112", "E113",
55+
# Error whitespace in brackets/around punctuation
56+
# around params, tabs/space around operators
57+
"E201", "E202", "E203", "E211", "E222", "E223", "E224",
58+
"E225", "E226", "E227", "E228", "E231", "E241", "E242",
59+
"E251", "E252", "E271", "E272", "E275",
60+
# Error blank lines between methods, classes etc.
61+
"E301", "E302", "E303", "E304", "E305", "E306",
62+
63+
"F", # pyflakes
64+
"G", # logging format _(.... % ...) bad use _(...) % ...
5165
"I", # imports
52-
"INT", # check gettext
53-
"Q", # quoting consistancy
54-
"PERF", # performance lint
55-
"PIE794", # duplicate class field definition
56-
"PL", # pylint
57-
"RET", # check for inconistent returns
58-
"RUF", # ruff
59-
"S", # bandit - security
60-
"SIM", # simplify code
61-
"T10", # flake8-debugger
62-
"W", # pycode whitespace warnings
66+
"INT", # check gettext
67+
"Q", # quoting consistancy
68+
"PERF", # performance lint
69+
"PIE794", # duplicate class field definition
70+
"PL", # pylint
71+
"PLW", # warnings
72+
"RET", # check for inconistent returns
73+
"RUF", # ruff
74+
"S", # bandit - security
75+
"SIM", # simplify code
76+
"T10", # flake8-debugger
77+
"W", # pycode whitespace warnings
6378
]
6479

6580
ignore = [
@@ -102,10 +117,3 @@ max-statements = 100
102117

103118
[tool.ruff.lint.mccabe]
104119
max-complexity = 50
105-
106-
#
107-
#skip=
108-
# C901
109-
# E228
110-
# E302
111-
# E401

0 commit comments

Comments
 (0)