-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
130 lines (124 loc) · 3.54 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
line-length = 88
unsafe-fixes = true
target-version = "py39"
[lint]
select = ["ALL"]
fixable = [
"D",
'UP',
'F401', # unused imports
"F522", # string-dot-format-extra-named-arguments
"F541", # f-string-missing-placeholders
"W292", # no-new-line-at-end-of-file
"E711", # none-comparison
"E712", # true-false-comparison
"E713", # not-in-test
"E714", # not-is-test
"I001", # unsorted-imports
"COM812", # trailing-comma-missing
"Q000", # bad-quotes-inline-string
"Q001", # bad-quotes-multiline-string
"SIM108", # if-else-block-instead-of-if-exp
"E501", # line-too-long
"FLY002", # static-join-to-f-string
"PLW3301", # nested-min-max
"RUF010", # explicit-f-string-type-conversion
"RUF100", # unused-noqa
"SIM110", # reimplemented-builtin
"RET504", # unnecessary-assign
"I002", # missing-required-import
"PIE808", # unnecessary-range-start
"RUF020", # never-union
"NPY201", # numpy2-deprecation
"PT",
]
ignore = [
"TD",
'E712', # TrueFalseComparison # sqlalchemy
"E711", # none-comparison # sqlalchemy
"EM101", # raw-string-in-exception
"TRY003", # raise-vanilla-args
"ANN101", # missing-type-self
"ANN102", # missing-type-cls
"ANN401", # dynamically-typed-expression
"FBT002", # boolean-default-value-in-function-definition
"PGH003", # blanket-type-ignore
"SIM117", # multiple-with-statements # python3.8
"B905", # zip-without-explicit-strict
"PD010", # use-of-dot-pivot-or-unstack
"D105", # undocumented-magic-method
"TD", # flake8-todos
"FIX", # flake8-fixme
"PLR2044", # empty-comment
# ruff format
"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
# pydocstyle # google default
"D203",
"D204",
"D213",
"D215",
"D400",
"D401",
"D404",
"D406",
"D407",
"D408",
"D409",
"D413",
# pydocstyle # ignore
"D212", # multi-line-summary-first-line
"D403", # first-line-capitalized
"D415", # ends-in-punctuation
"D107", # undocumented-public-init
"D105", # undocumented-magic-method
# pydocstyle # TODO
"D100", # undocumented-public-module
"D104", # undocumented-public-package
# async
"ASYNC109", # async-function-with-timeout
]
[lint.per-file-ignores]
"src/tests/**/*.py" = [
"TCH001",
"TCH002",
"TCH003",
"S101",
"D101",
"ANN001",
"ANN201",
"PLR0133",
"W605",
"D103",
"D102",
"PLR2004",
]
"src/docs/conf.py" = ["INP001", "A001"]
[format]
indent-style = "space"
preview = true
quote-style = "double"
skip-magic-trailing-comma = true
[lint.isort]
known-local-folder = ["async_wrapper", "tests"]
required-imports = ["from __future__ import annotations"]
# ruff format
force-single-line = false
force-wrap-aliases = false
split-on-trailing-comma = false
[lint.pydocstyle]
convention = "google"
[lint.flake8-type-checking]
exempt-modules = ["typing", "typing_extensions"]