diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af8a002d363ab..326507e666700 100755 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -17,8 +17,11 @@ repos: - id: remove-tabs files: (.*\.(py|bzl)|BUILD|.*\.BUILD|WORKSPACE)$ args: [--whitespaces-count, '4'] + # Exclude the fluid directory but keep the fluid/tests directory. + # And exclude some unit test files that require tabs. exclude: | (?x)^( + python/paddle/fluid/(?!.*tests).+| python/paddle/fluid/tests/unittests/collective/fleet/test_hdfs1.py| python/paddle/fluid/tests/unittests/dygraph_to_static/test_error.py )$