百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

ruff

> 编程语言
免费

一个极其快速的 Python 行整理器和代码格式化器,使用 Rust 编写。

50.0K stars0 点赞2 次浏览
访问官网GitHub

工具介绍

一个极其快速的 Python 行整理器和代码格式化器,使用 Rust 编写。

# Ruff[**文档**](https://docs.astral.sh/ruff/) | [**实战平台**](https://play.ruff.rs/)一个极其快速的 Python 校验器和代码格式化器,采用 Rust 编写。

从头开始校验 CPython 代码库。

- ⚡️ 速度比现有的 linter(如 Flake8)和格式化工具(如 Black)快 10-100 倍 - 可通过 `pip` 安装 - ️ 支持 `pyproject.toml` - 兼容 Python 3.14 - ⚖️ 与 [Flake8](https://docs.astral.sh/ruff/faq/#how-does-ruffs-linter-compare-to-flake8)、[isort](https://docs.astral.sh/ruff/faq/#how-does-ruffs-import-sorting-compare-to-isort) 和 [Black](https://docs.astral.sh/ruff/faq/#how-does-ruffs-formatter-compare-to-black) 具有相同的功能 - 内置缓存,避免重新分析未变更的文件 - 支持修复,用于自动纠正错误(例如,自动删除未使用的导入语句) - 拥有 [900 多个内置规则](https://docs.astral.sh/ruff/rules/),其中包含了流行的 Flake8 插件(如 flake8-bugbear)的原生重新实现 - 适合单一仓库,具有 [层次化和级联配置](https://docs.astral.sh/ruff/configuration/#config-file-discovery) - 为 [VS Code](https://github.com/astral-sh/ruff-vscode) 和 [更多](https://docs.astral.sh/ruff/editors/setup) 提供了第一方 [编辑器集成]() Ruff 的目标是比其他工具快几个数量级,同时在单一的通用接口中集成更多功能。Ruff 可以用来替代 [Flake8](https://pypi.org/project/flake8/)(以及数十个插件)、[Black](https://github.com/psf/black)、[isort](https://pypi.org/project/isort/)、[pydocstyle](https://pypi.org/project/pydocstyle/)、[pyupgrade](https://pypi.org/project/pyupgrade/)、[autoflake](https://pypi.org/project/autoflake/) 等工具,而且还能提供更多功能。

Issues· 2186 开放

查看全部 Issues在 GitHub 打开
  • #28866

    支持 `__lazy_modules__` 中的 `flake8-lazy` 相对导入风格

    ruleneeds-decision更新于 2026年9月29日
  • #10578

    依赖关系仪表板

    internal更新于 2026年9月29日
  • #21581

    格式化器应避免将参数分割到自己的行中

    formatterstyle更新于 2026年9月28日
  • #28930

    多行字符串的 Known Deviations 文档不正确

    documentation更新于 2026年9月28日
  • #28777

    `too-many-positional-arguments`: dataclasses?

    ruleneeds-decision更新于 2026年9月28日
  • #28945

    RUF031 子标记中的括号错误: 负面假阳性

    ruleneeds-decision更新于 2026年9月28日
  • #28942

    PLC0414 useless-import-alias: 在 *.pyi 文件中检测到 - mypy stubgen 生成了违规

    ruleneeds-decision更新于 2026年9月28日
  • #28922

    B018: 无用表达式的另一个示例以记录

    ruleneeds-decision更新于 2026年9月27日
  • #16401

    在格式化时忽略特定注释

    configurationformatter更新于 2026年9月27日
  • #1774

    规则分类

    core更新于 2026年9月27日

> 标签

Rustlinterpep8python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年10月12日
分类编程语言
定价免费

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言