Skip to content

Commit

Permalink
[CodeStyle] update ruff v0.1.5 (PaddlePaddle#58966)
Browse files Browse the repository at this point in the history
* update ruff to v0.1.5

* refine ruff config

---------

Co-authored-by: SigureMo <[email protected]>
  • Loading branch information
2 people authored and SecretXV committed Nov 28, 2023
1 parent 490b06f commit b8f425c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ repos:
- id: flake8
args: ["--config=.flake8"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.289
rev: v0.1.5
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --no-cache]
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ exclude = [
"./python/paddle/utils/gast/**",
]
target-version = "py37"

[tool.ruff.lint]
select = [
# Pyflakes
"F",
Expand Down Expand Up @@ -90,7 +92,7 @@ ignore = [
"UP038",
]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
# Ignore unused imports in __init__.py
"__init__.py" = ["F401"]
# Ignore undefined variables in CMake config and some dygraph_to_static tests
Expand Down

0 comments on commit b8f425c

Please sign in to comment.