-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathruff.toml
71 lines (63 loc) · 2.35 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
line-length = 88
indent-width = 4
include = [
"vegafusion-python/vegafusion/**/*.py",
"vegafusion-python/tests/**/*.py",
"vegafusion-python/checks/**/*.py",
"examples/python-examples/**/*.py",
]
exclude = ["vegafusion-python/tests/altair_mocks/**/*.py"]
target-version = "py39"
[lint]
select = [
"E", # pycodestyle Error
"F", # Pyflakes
"W", # pycodestyle Warning
"I", # isort
"N", # PEP8 Naming
"UP", # pyupgrade
"YTT", # flake8-2020
"ANN", # flake8-annotations
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-annotations-complexity
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"FA", # flake8-future-annotations
]
ignore = [
# Allow assert statements
"S101",
# Rules that conflict with other rules
"D211", # No blank lines allowed before class docstring (no-blank-line-before-class-docstring)
"D213", # Multi-line docstring summary should start at the second line (multi-line-docstring-summary-start)
"EM101", # Exception must not use an string literal
"EM102", # Exception must not use an f-string literal
# Not compatible with Python 3.9. Re-enable when upgrading to Python 3.10+
"UP007", # Using old-style union syntax (e.g., Union[int, str] instead of int | str)
"UP018", # Using non-native literals (e.g., using 'int' instead of 'Literal[int]')
# Deprecated and not useful
"ANN101", # Missing type annotation for self in method (missing-type-annotation-for-self)
"ANN102", # Missing type annotation for class (missing-type-cls)
"S608", # SQL injection
# Conflicting lint rules with Ruff formatter
"W191", # Tab indentation
"E111", # Indentation with invalid multiple
"E114", # Indentation with invalid multiple comment
"E117", # Over-indented
"D206", # Indent with spaces
"D300", # Triple single quotes
"Q000", # Bad quotes inline string
"Q001", # Bad quotes multiline string
"Q002", # Bad quotes docstring
"Q003", # Avoidable escaped quote
"COM812", # Missing trailing comma
"COM819", # Prohibited trailing comma
"ISC001", # Single-line implicit string concatenation
"ISC002", # Multi-line implicit string concatenation
]
[lint.per-file-ignores]
# Ignore some lint checks in test directory
"vegafusion-python/tests/*" = ["D", "ANN", "S", "I", "E501"]
"examples/python-examples/*" = ["D", "ANN", "S", "I", "E501"]