未验证 提交 360cce1d 编写于 作者: N Nyakku Shigure 提交者: GitHub

[CodeStyle] fix flake8 cannot find the config on Windows (#51012)

* [CodeStyle] fix flake8 cannot find the config on Windows

* empty commit; test=document_fix
上级 a0562813
...@@ -13,16 +13,26 @@ exclude = ...@@ -13,16 +13,26 @@ exclude =
./python/paddle/fluid/tests/unittests/npu/**, ./python/paddle/fluid/tests/unittests/npu/**,
./python/paddle/fluid/tests/unittests/mlu/** ./python/paddle/fluid/tests/unittests/mlu/**
ignore = ignore =
E203, # Whitespace before ‘,’, ‘;’, or ‘:’, it is not compatible with black # Whitespace before ‘,’, ‘;’, or ‘:’, it is not compatible with black
E402, # Module level import not at top of file E203,
E501, # Line too long (82 > 79 characters) # Module level import not at top of file
E721, # Do not compare types, use `isinstance()` E402,
E722, # Do not use bare except, specify exception instead # Line too long (82 > 79 characters)
E731, # Do not assign a lambda expression, use a def E501,
E741, # Do not use variables named ‘l’, ‘O’, or ‘I’ # Do not compare types, use `isinstance()`
F405, # `name` may be undefined, or defined from star imports: `module` E721,
F841, # Local variable name is assigned to but never used # Do not use bare except, specify exception instead
W503 # Line break before binary operator, it is not compatible with black 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,
# Line break before binary operator, it is not compatible with black
W503
per-file-ignores = per-file-ignores =
# These files need tabs for testing. # These files need tabs for testing.
python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py:E101,W191 python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py:E101,W191
......
...@@ -64,9 +64,10 @@ repos: ...@@ -64,9 +64,10 @@ repos:
hooks: hooks:
- id: isort - id: isort
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 4.0.1 rev: 5.0.4
hooks: hooks:
- id: flake8 - id: flake8
args: ["--config=.flake8"]
- repo: https://github.com/PyCQA/autoflake - repo: https://github.com/PyCQA/autoflake
rev: v1.7.7 rev: v1.7.7
hooks: hooks:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册