Skip to content

Commit

Permalink
[CodeStyle] Bump ruff to 0.2.0 and enable NPY201 (PaddlePaddle#6495)
Browse files Browse the repository at this point in the history
  • Loading branch information
SigureMo authored Feb 3, 2024
1 parent 447dcee commit 9620784
Show file tree
Hide file tree
Showing 3 changed files with 3 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 @@ -26,7 +26,7 @@ repos:
files: \.md$|\.rst$
# For Python files
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
rev: v0.2.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --no-cache]
Expand Down
2 changes: 1 addition & 1 deletion docs/dev_guides/git_guides/codestyle_check_guide_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Date: xxx
| [copyright_checker](https://github.com/PaddlePaddle/Paddle/blob/develop/tools/codestyle/copyright.hook) | Copyright 检查 | 本地脚本 |
| [black](https://github.com/psf/black) | Python 代码格式化 | 23.3.0 |
| [flake8](https://github.com/PyCQA/flake8) | Python 代码风格检查(即将被 Ruff 完全替换) | 5.0.4 |
| [ruff](https://github.com/astral-sh/ruff) | Python 代码风格检查 | 0.1.5 |
| [ruff](https://github.com/astral-sh/ruff) | Python 代码风格检查 | 0.2.0 |
| [clang-format](https://github.com/llvm/llvm-project/tree/main/clang/tools/clang-format) | C++ 代码格式化 | 13.0.0 |
| [cpplint](https://github.com/cpplint/cpplint) | C++ 代码风格检查 | 1.6.0 |
| [clang-tidy](https://github.com/llvm/llvm-project/tree/main/clang-tools-extra/clang-tidy) | C++ 代码风格检查 | 15.0.2.1 |
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ select = [
# NumPy-specific rules
"NPY001",
"NPY003",
"NPY201",

# Bugbear
"B002",
Expand Down

0 comments on commit 9620784

Please sign in to comment.