-
Notifications
You must be signed in to change notification settings - Fork 3
/
ruff.toml
45 lines (43 loc) · 2.19 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
target-version = "py312"
lint.select = ["ALL"]
lint.ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"C901", # function is too complex (12 > 10)
"COM812", # Trailing comma missing
"D", # Docstring rules
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"ERA001", # Found commented-out code
"FBT001", # Boolean positional arg in function definition
"FBT002", # Boolean default value in function definition
"FBT003", # Boolean positional value in function call
"FIX002", # Line contains TODO
"ISC001", # Isort
"PLR0911", # Too many return statements (11 > 6)
"PLR2004", # Magic value used in comparison, consider replacing 2 with a constant variable
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
"S101", # Use of `assert` detected
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
"T201", # print() found
"T203", # pprint() found
"TD002", # Missing author in TODO; try: `# TODO(<author_name>): ...`
"TD003", # Missing issue link on the line following this TODO
"TD005", # Missing issue description after `TODO`
"TRY003", # Avoid specifying long messages outside the exception class
# ai-toolkit-specific ignores
"ANN001", # Missing type annotation for function argument `img_dim`
"ANN201", # Missing return type annotation for public function `forward`
"ANN202", # Missing return type annotation for private function `_flip_coco_person_keypoints`
"ANN204", # Missing return type annotation for special method `__init__`
"ANN205", # Missing return type annotation for staticmethod `get_transforms`
"N803", # Argument name `X` should be lowercase
"N806", # Variable `X` in function should be lowercase
"N812", # Lowercase `functional` imported as non-lowercase `F`
"NPY002", # Replace legacy `np.random.randn` call with `np.random.Generator`
]
[lint.flake8-pytest-style]
fixture-parentheses = false