未验证 提交 4bbb0b38 编写于 作者: N Nyakku Shigure 提交者: GitHub

[CodeStyle][F401] update flake8 F401 config (unittests/npu,xpu,mlu,ipu) (#46792)

* exclude python code that auto-generated by protoc

* [CodeStyle][F401] update flake8 F401 config (unittests/npu,xpu,mlu,ipu)

* add npu, mlu to `exclude` field

* empty commit, test=document_fix
上级 72fecaa5
......@@ -5,7 +5,15 @@ exclude =
# A trick to exclude fluid/ but keep fluid/tests/, see more at
# https://github.com/PaddlePaddle/Paddle/pull/46290#discussion_r976392010
./python/paddle/fluid/[!t]**,
./python/paddle/fluid/tra**
./python/paddle/fluid/tra**,
# Exclude auto-generated files
*_pb2.py,
# Exclude third-party libraries
./python/paddle/utils/gast/**,
# Exclude files that will be removed in the future, see more at
# https://github.com/PaddlePaddle/Paddle/pull/46782#issuecomment-1273033731
./python/paddle/fluid/tests/unittests/npu/**,
./python/paddle/fluid/tests/unittests/mlu/**
ignore =
# E, see https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
E121,E122,E123,E125,E126,E127,E128,E129,E131,
......@@ -60,11 +68,7 @@ per-file-ignores =
python/paddle/metric/*:F401
python/paddle/fluid/tests/unittests/ir/*:F401
python/paddle/fluid/tests/unittests/tokenizer/*:F401
python/paddle/fluid/tests/unittests/xpu/*:F401
python/paddle/fluid/tests/unittests/distribution/*:F401
python/paddle/fluid/tests/unittests/mlu/*:F401
python/paddle/fluid/tests/unittests/npu/*:F401
python/paddle/fluid/tests/unittests/ipu/*:F401
python/paddle/fluid/tests/unittests/distributed_passes/*:F401
python/paddle/fluid/tests/unittests/auto_parallel/*:F401
python/paddle/fluid/tests/unittests/dygraph_to_static/*:F401
......
# Exclude all third-party libraries globally
# Exclude all third-party libraries and auto-generated files globally
exclude: |
(?x)^(
patches/.+|
paddle/fluid/framework/fleet/heter_ps/cudf/.+|
paddle/fluid/distributed/ps/thirdparty/round_robin.h|
python/paddle/utils/gast/.+
python/paddle/utils/gast/.+|
.+_py2\.py|
python/paddle/fluid/tests/unittests/npu/.+|
python/paddle/fluid/tests/unittests/mlu/.+
)$
repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册