diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f36c71dca52..dd816e95326 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - id: check-case-conflict # For Python files - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.0 + rev: v0.16.0 hooks: - id: ruff-check 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 796000c5365..1a928788082 100644 --- a/docs/dev_guides/git_guides/codestyle_check_guide_cn.md +++ b/docs/dev_guides/git_guides/codestyle_check_guide_cn.md @@ -88,10 +88,10 @@ Date: xxx | [pre-commit](https://github.com/pre-commit/pre-commit) | hook 管理工具 | >=2.17.0 | | [pre-commit/pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks) | pre-commit 官方支持的 hook,执行一些通用检查 | 4.4.0 | | [Lucas-C/pre-commit-hooks](https://github.com/Lucas-C/pre-commit-hooks.git) | 社区维护的一些通用的 hook,含将 CRLF 改为 LF、移除 Tab 等 hook | 1.5.1 | -| [ast-grep](https://github.com/ast-grep/ast-grep) | 基于语法树的结构规则检查 | 0.44.0 | +| [ast-grep](https://github.com/ast-grep/ast-grep) | 基于语法树的结构规则检查 | 0.45.0 | | [copyright_checker](https://github.com/PaddlePaddle/Paddle/blob/develop/tools/codestyle/copyright.py) | Copyright 检查 | 本地脚本 | | [typos](https://github.com/crate-ci/typos) | 拼写错误检查 | 1.48.0 | -| [ruff](https://github.com/astral-sh/ruff) | Python 代码风格检查 | 0.15.0 | +| [ruff](https://github.com/astral-sh/ruff) | Python 代码风格检查 | 0.16.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 c3ef0d7c367..7cce3a01827 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,4 +1,5 @@ [tool.ruff] +extend-exclude = ["*.md"] line-length = 80 target-version = "py39"