未验证 提交 bb118132 编写于 作者: G gouzil 提交者: GitHub

[CodeStyle][CINN] exclude cinn files in flake8 and ruff config (#54974)

* [codestyle] add exclude

* refine config

* empty commit, test=document_fix

---------
Co-authored-by: NSigureMo <sigure.qaq@gmail.com>
上级 104a518c
...@@ -7,9 +7,6 @@ exclude = ...@@ -7,9 +7,6 @@ exclude =
# Exclude third-party libraries # Exclude third-party libraries
./third_party/**, ./third_party/**,
./python/paddle/utils/gast/**, ./python/paddle/utils/gast/**,
# Temporarily ignore CINN files, it will fix later
./python/cinn/**,
./test/cinn/**,
ignore = ignore =
# Whitespace before ‘,’, ‘;’, or ‘:’, it is not compatible with black # Whitespace before ‘,’, ‘;’, or ‘:’, it is not compatible with black
E203, E203,
...@@ -30,3 +27,21 @@ ignore = ...@@ -30,3 +27,21 @@ ignore =
per-file-ignores = per-file-ignores =
# These files need tabs for testing. # These files need tabs for testing.
test/dygraph_to_static/test_error.py:E101,W191 test/dygraph_to_static/test_error.py:E101,W191
# Temporarily ignore CINN files, it will fix later
python/cinn/**:
E265,
test/cinn/**:
E126,
E231,
E251,
E265,
E266,
E401,
E711,
W291,
W504,
paddle/cinn/**:
E265,
tools/cinn/**:
E265,
E401,
...@@ -29,9 +29,6 @@ exclude = [ ...@@ -29,9 +29,6 @@ exclude = [
"third_party", "third_party",
"./python/paddle/fluid/**", "./python/paddle/fluid/**",
"./python/paddle/utils/gast/**", "./python/paddle/utils/gast/**",
# Temporarily ignore CINN files, it will fix later
"python/cinn/**",
"test/cinn/**",
] ]
target-version = "py37" target-version = "py37"
select = [ select = [
...@@ -103,3 +100,38 @@ ignore = [ ...@@ -103,3 +100,38 @@ ignore = [
"test/dygraph_to_static/test_loop.py" = ["C416", "F821"] "test/dygraph_to_static/test_loop.py" = ["C416", "F821"]
# Ignore unnecessary lambda in dy2st unittest test_lambda # Ignore unnecessary lambda in dy2st unittest test_lambda
"test/dygraph_to_static/test_lambda.py" = ["PLC3002"] "test/dygraph_to_static/test_lambda.py" = ["PLC3002"]
# Temporarily ignore CINN files, it will fix later
"python/cinn/**" = [
"F401",
"F403",
"UP004",
]
"test/cinn/**" = [
"F401",
"F403",
"F632",
"F811",
"F821",
"F901",
"C408",
"C417",
"UP004",
"UP008",
"UP027",
"UP032",
"UP034",
"PLR0402",
"PLC0414",
"PLE1205",
]
"paddle/cinn/**" = [
"UP032",
]
"tools/cinn/**" = [
"F401",
"C416",
"UP004",
"UP031",
"UP032",
"PLR0402",
]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册