diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48a7eee4b3e..ee9106f0a42 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/docs/dev_guides/git_guides/codestyle_check_guide_cn.md b/docs/dev_guides/git_guides/codestyle_check_guide_cn.md index cc00a63ae34..97a7425140a 100644 --- a/docs/dev_guides/git_guides/codestyle_check_guide_cn.md +++ b/docs/dev_guides/git_guides/codestyle_check_guide_cn.md @@ -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 | diff --git a/pyproject.toml b/pyproject.toml index 79b96a24e81..16228cf4428 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ select = [ # NumPy-specific rules "NPY001", "NPY003", + "NPY201", # Bugbear "B002",