-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
72 lines (61 loc) · 1.82 KB
/
ruff.toml
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
line-length = 100
target-version = 'py312'
[format]
line-ending = 'lf'
quote-style = 'single'
[lint]
fixable = [
'I',
'Q',
'C4',
'COM',
'UP',
'PIE790', # Unnecessary pass statement
'W291', # Trailing whitespace
'W293', # Blank line contains whitespace
'RUF100', # Unused blanket noqa directive
'E711', # Comparison to `None` should be `cond is None`
'E712', # Comparison to `True` should be `cond is True` or `if cond:`
'E713', # Test for membership should be `not in`
'E714', # Test for object identity should be `is not`
'F901', # `raise NotImplemented` should be `raise NotImplementedError`
'ISC', # Implicit str concat
]
select = [
'E', # ruff default: pycodestyle errors
'W', # pycodestyle warnings
'F', # ruff default: pyflakes
'I', # isort
'Q', # flake8-quotes
'UP', # pyupgrade
'YTT', # flake8-2020
'B', # flake8-bandit
'A', # flake8-builtins
'C4', # flake8-comprehensions
'T10', # flake8-debugger
'DJ', # flake8-django
'EXE', # flake8-executable
'PIE', # flake8-pie
'COM', # flake-8 commas
'RUF', # ruff specific
'SIM', # flake8-simplify
'ISC', # https://pypi.org/project/flake8-implicit-str-concat/
'PTH', # flake8-use-pathlib
# 'DTZ', # flake8-datetimez
]
ignore = [
'A003', # Class attribute is shadowing a Python builtin
'E731', # Do not assign a `lambda` expression, use a `def`
]
# [per-file-ignores]
# 'mu/cli/__init__.py' = ['F401', 'I001']
[lint.flake8-builtins]
builtins-ignorelist = ['id', 'help', 'compile']
[lint.flake8-quotes]
# Prefer using different quote to escaping strings
avoid-escape = true
inline-quotes = 'single'
[lint.isort]
lines-after-imports = 2
force-sort-within-sections = true
known-first-party = ['tasks_lib']