Skip to content

Commit

Permalink
[CodeStyle][F401] replace autoflake with ruff (#51529)
Browse files Browse the repository at this point in the history
* [CodeStyle] initial ruff config

* update F401 config

* [CodeStyle][F401] replace autoflake with ruff

* empty commit; test=document_fix

* restore unfixable; test=document_fix
  • Loading branch information
SigureMo authored Mar 16, 2023
1 parent 3ecf46b commit 2d97316
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ repos:
hooks:
- id: flake8
args: ["--config=.flake8"]
- repo: https://github.com/PyCQA/autoflake
rev: v1.7.7
hooks:
- id: autoflake
args:
- --in-place
- --remove-all-unused-imports
- --ignore-pass-after-docstring
- --ignore-init-module-imports
- --exclude=python/paddle/fluid/[!t]**,python/paddle/fluid/tra**
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.254
hooks:
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ exclude = [
]
target-version = "py37"
select = [
# Pyflakes
"F401",

# Pyupgrade
"UP001",
"UP003",
Expand Down

0 comments on commit 2d97316

Please sign in to comment.