-
Notifications
You must be signed in to change notification settings - Fork 709
Expand file tree
/
Copy pathpyproject.toml
More file actions
57 lines (49 loc) · 1.41 KB
/
pyproject.toml
File metadata and controls
57 lines (49 loc) · 1.41 KB
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
[tool.isort]
profile = 'black'
known_third_party = ["paddle"]
[tool.black]
line-length = 119
target_version = ['py310', 'py311', 'py312']
exclude = '.flake8'
[tool.ruff]
exclude = [
"./build",
"custom_ops/third_party",
]
line-length = 119
target-version = "py310"
[tool.ruff.format]
# Prevent change to double quotes by some users use ruff format
quote-style = "preserve"
[tool.ruff.lint]
ignore = [
# Whitespace before ‘,’, ‘;’, or ‘:’, it is not compatible with black
"E203",
# Module level import not at top of file
"E402",
# Line too long (82 > 79 characters)
"E501",
# Do not compare types, use `isinstance()`
"E721",
# Do not use bare except, specify exception instead
"E722",
# Do not assign a lambda expression, use a def
"E731",
# Do not use variables named ‘l’, ‘O’, or ‘I’
"E741",
# `name` may be undefined, or defined from star imports: `module`
"F405",
# Local variable name is assigned to but never used
"F841",
# It not met the "Explicit is better than implicit" rule
"UP015",
# It will cause the performance regression on python3.10
"UP038",
# collections.namedtuple can be quickly created a inlined class
"PYI024",
# `__all__.append` is a common pattern in Paddle
"PYI056",
]
[tool.ruff.lint.per-file-ignores]
# Ignore for re-export in __init__ files
"__init__.py" = ["PLC0414"]