1 Star 0 Fork 424

ybot / Paddle

forked from PaddlePaddle / Paddle 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pyproject.toml 2.84 KB
一键复制 编辑 原始数据 按行查看 历史
[tool.black]
line-length = 80
skip-string-normalization = true
extend-exclude = '''
(
third_party/.+ # Exclude third_party directory
| build/.+ # Exclude build directory
)
'''
[tool.isort]
profile = "black"
line_length = 80
known_first_party = ["paddle"]
skip = ["build", "third_party", "__init__.py"]
extend_skip_glob = [
# These files do not need to be formatted,
# see .flake8 for more details
"python/paddle/utils/gast/**",
"python/paddle/base/core.py",
"python/paddle/base/framework.py",
]
[tool.ruff]
exclude = [
"./build",
"third_party",
"./python/paddle/utils/gast/**",
]
target-version = "py37"
select = [
# Pyflakes
"F",
# Comprehensions
"C4",
# Pyupgrade
"UP",
# NumPy-specific rules
"NPY001",
"NPY003",
# Bugbear
"B002",
"B003",
"B004",
"B009",
"B010",
"B011",
"B012",
"B013",
"B014",
"B015",
"B016",
"B017",
"B018",
"B019",
"B020",
"B021",
"B022",
"B025",
"B029",
"B032",
# Pylint
"PLE",
"PLC0414",
"PLC3002",
"PLR0206",
"PLR0402",
"PLR1701",
"PLR1711",
"PLR1722",
"PLW3301",
]
unfixable = [
"NPY001"
]
ignore = [
# `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",
]
[tool.ruff.per-file-ignores]
# Ignore unused imports in __init__.py
"__init__.py" = ["F401"]
# Ignore undefined variables in CMake config and some dygraph_to_static tests
".cmake-format.py" = ["F821"]
"test/dygraph_to_static/test_closure_analysis.py" = ["F821"]
"python/paddle/static/amp/decorator.py" = ["F821"]
# Ignore version check in setup.py
"setup.py" = ["UP036"]
# Ignore unnecessary comprehension in dy2st unittest test_loop
"test/dygraph_to_static/test_loop.py" = ["C416", "F821"]
# Ignore unnecessary lambda in dy2st unittest test_lambda
"test/dygraph_to_static/test_lambda.py" = ["PLC3002"]
# Temporarily ignored
"python/paddle/base/**" = [
"UP031",
"C408",
"UP030",
"C405",
"C417",
"B004",
"B009",
"B016",
"B019", # Confirmation required
"C411",
"C416",
"F821",
"PLC0414",
]
# B017
"test/auto_parallel/spmd_rules/test_reshape_rule.py" = ["B017"]
"test/dygraph_to_static/test_assert.py" = ["B017"]
"test/legacy_test/test_cuda_max_memory_allocated.py" = ["B017"]
"test/legacy_test/test_cuda_max_memory_reserved.py" = ["B017"]
"test/legacy_test/test_cuda_memory_allocated.py" = ["B017"]
"test/legacy_test/test_cuda_memory_reserved.py" = ["B017"]
"test/legacy_test/test_eigvals_op.py" = ["B017"]
"test/legacy_test/test_tensordot.py" = ["B017"]
"test/legacy_test/test_top_k_v2_op.py" = ["B017"]
Python
1
https://gitee.com/ybot/Paddle.git
git@gitee.com:ybot/Paddle.git
ybot
Paddle
Paddle
develop

搜索帮助