-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
113 lines (98 loc) · 2.93 KB
/
ruff.toml
File metadata and controls
113 lines (98 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
line-length = 79
extend-exclude = ["stubs", "tests/package"]
[lint]
# from WPS
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"C90", # maccabe
"COM", # flake8-commas
"D", # pydocstyle
"DTZ", # flake8-datetimez
"E", # pycodestyle
"ERA", # flake8-eradicate
"EXE", # flake8-executable
"F", # pyflakes
"FBT", # flake8-boolean-trap
"FLY", # pyflint
"FURB", # refurb
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"N", # pep8-naming
"PERF", # perflint
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff
"S", # flake8-bandit
"SIM", # flake8-simpify
"SLF", # flake8-self
"SLOT", # flake8-slots
"T100", # flake8-debugger
"TRY", # tryceratops
"UP", # pyupgrade
"W", # pycodestyle
"YTT", # flake8-2020
]
ignore = [
"A005", # allow to shadow stdlib and builtin module names
"COM812", # trailing comma, conflicts with `ruff format`
# Different doc rules that we don't really care about:
"D100",
"D104",
"D106",
"D203",
"D212",
"D401",
"D404",
"D405",
"ISC001", # implicit string concat conflicts with `ruff format`
"ISC003", # prefer explicit string concat over implicit concat
"PLR09", # we have our own complexity rules
"PLR2004", # do not report magic numbers
"PLR6301", # do not require classmethod / staticmethod when self not used
"TRY003", # long exception messages from `tryceratops`
# My own additions
"N818",
# Just wrong in every possible way. If class extends an Exception, then
# it's an exception, not an Error. Moreover, Error is smth unrecoverable,
# while Exception is not so scary and more routine.
"S324",
# This project does not need security in any way
"RUF100",
# does not detect wps
"S602",
# `shell=True` is ok
"PTH",
# TODO: refactor in future
"ICN001",
# WTF? pls don't teach me how I should name tkinter
"DTZ",
# time has no impact on the project
"TRY400", "TRY401", "PLE1205", "PT003"
# project-specific issues of compatibility
]
[lint.per-file-ignores]
"tests/*.py" = [
"S101", # asserts
"S105", # hardcoded passwords
"S404", # subprocess calls are for tests
"S603", # do not require `shell=True`
"S607", # partial executable paths
"F401", # fixtures
"F811", # fixtures
]
"user_select/*.py" = ["E", "PTH", "FBT", "D"]
"project_scripts.py" = ["S", "D", "E", "PLR"]
"embark/resources.py" = ["SLF001"]
"embark/platform_impl/windows/install_loader.py" = ["PERF203"]
"embark/localization/i18n.py" = ["PLW0603"]
"embark/main.py" = ["E402"]