-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathruff.toml
89 lines (83 loc) · 2.4 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
line-length = 120
src = ["python/serpyco_rs", "tests"]
exclude = ["pyproject.toml"]
target-version = "py39"
[lint]
select = [
"F", # Pyflakes
"E", # Pycodestyle Error
"W", # PycodeStyle Warning
"I", # Isort
"N", # pep8-naming
"UP", # pyupgrade
"YTT", # flake8-2020
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"PTH", # flake8-use-pathlib
"PGH", # pygrep-hooks
"PL", # Pylint
"TRY", # tryceratops
"RUF", # Ruff-specific rules
]
ignore = [
"F401", # unused-import
"UP040", # non-pep695-type-alias
"B005", # strip-with-multi-characters
"B905", # zip-without-explicit-strict
"N818", # error-suffix-on-exception-name
"ISC001", # single-line-implicit-string-concatenation
"Q003", # avoidable-escaped-quote
"SIM108", # if-else-block-instead-of-if-exp
"SIM212", # if-expr-with-twisted-arms
"PTH123", # builtin-open
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PLR2004", # magic-value-comparison
"PLW2901", # redefined-loop-name
"SIM300", # yoda-conditions
"TID252", # relative-imports
"PGH004", # blanket-noqa
"TRY002", # raise-vanilla-class
"TRY003", # raise-vanilla-args
"RUF001", # ambiguous-unicode-character-string
"RUF002", # ambiguous-unicode-character-docstring
"RUF003", # ambiguous-unicode-character-comment
"RUF005", # collection-literal-concatenation
"RUF006", # asyncio-dangling-task
"RUF012", # mutable-class-default
"RET504", # unnecessary-assign
"TRY004", # type-check-without-type-error
"PGH003", # blanket-type-ignore (todo: fix this)
]
[lint.per-file-ignores]
"python/serpyco_rs/_impl.pyi" = [
"I001",
]
"python/serpyco_rs/_impl.py" = [
"I001",
]
"python/serpyco_rs/_json_schema/_entities.py" = [
"N815", # mixed-case-variable-name
]
[lint.flake8-quotes]
inline-quotes = "single"
[lint.isort]
combine-as-imports = true
lines-after-imports = 2
no-lines-before = ["local-folder"]
[format]
quote-style = "single"