v0.1.2
版本发布时间: 2023-10-24 23:56:25
astral-sh/ruff最新发布版本:0.5.3(2024-07-19 01:10:02)
This release includes the Beta version of the Ruff formatter — an extremely fast, Black-compatible Python formatter.
Try it today with ruff format
! Check out the blog post and read the docs.
Changes
Preview features
- [
pylint
] Implementnon-ascii-module-import
(C2403
) (#8056) - [
pylint
] implementnon-ascii-name
(C2401
) (#8038) - [
pylint
] Implement unnecessary-lambda (W0108) (#7953) - [
refurb
] Implementread-whole-file
(FURB101
) (#7682) - Add fix for
E223
,E224
, andE242
(#8143) - Add fix for
E225
,E226
,E227
, andE228
(#8136) - Add fix for
E252
(#8142) - Add fix for
E261
(#8114) - Add fix for
E273
andE274
(#8144) - Add fix for
E275
(#8133) - Update
SIM401
to catch ternary operations (#7415) - Update
E721
to allowis
andis
not for direct type comparisons (#7905)
Rule changes
- Add
backports.strenum
todeprecated-imports
(#8113) - Update
SIM112
to ignorehttps_proxy
,http_proxy
, andno_proxy
(#8140) - Update fix for
literal-membership
(PLR6201
) to be unsafe (#8097) - Update fix for
mutable-argument-defaults
(B006
) to be unsafe (#8108)
Formatter
- Change
line-ending
default toauto
(#8057) - Respect parenthesized generators in
has_own_parentheses
(#8100) - Add caching to formatter (#8089)
- Remove
--line-length
option fromformat
command (#8131) - Add formatter to
line-length
documentation (#8150) - Warn about incompatible formatter options (#8088)
- Fix range of unparenthesized tuple subject in match statement (#8101)
- Remove experimental formatter warning (#8148)
- Don't move type param opening parenthesis comment (#8163)
- Update versions in format benchmark script (#8110)
- Avoid loading files for cached format results (#8134)
CLI
- Show the
ruff format
command in help menus (#8167) - Add
ruff version
command with long version display (#8034)
Configuration
- New
pycodestyle.max-line-length
option (#8039)
Bug fixes
- Detect
sys.version_info
slices inoutdated-version-block
(#8112) - Avoid if-else simplification for
TYPE_CHECKING
blocks (#8072) - Avoid false-positive print separator diagnostic with starred argument (#8079)
Documentation
- Fix message for
too-many-arguments
lint (#8092) - Fix
extend-unsafe-fixes
andextend-safe-fixes
example (#8139) - Add links to
flake8-import-conventions
options (#8115) - Rework the documentation to incorporate the Ruff formatter (#7732)
- Fix
Options
JSON schema description (#8081) - Fix typo (
pytext
->pytest
) (#8117) - Improve
magic-value-comparison
example in docs (#8111)
Contributors
1、 ruff-aarch64-apple-darwin.tar.gz 5.29MB
2、 ruff-aarch64-apple-darwin.tar.gz.sha256 99B
3、 ruff-aarch64-pc-windows-msvc.zip 5.41MB
4、 ruff-aarch64-pc-windows-msvc.zip.sha256 99B
5、 ruff-aarch64-unknown-linux-gnu.tar.gz 5.56MB
6、 ruff-aarch64-unknown-linux-gnu.tar.gz.sha256 104B
7、 ruff-aarch64-unknown-linux-musl.tar.gz 5.51MB
8、 ruff-aarch64-unknown-linux-musl.tar.gz.sha256 105B
9、 ruff-armv7-unknown-linux-gnueabihf.tar.gz 5.28MB
10、 ruff-armv7-unknown-linux-gnueabihf.tar.gz.sha256 108B
11、 ruff-armv7-unknown-linux-musleabihf.tar.gz 5.29MB
12、 ruff-armv7-unknown-linux-musleabihf.tar.gz.sha256 109B
13、 ruff-i686-pc-windows-msvc.zip 5.27MB
14、 ruff-i686-pc-windows-msvc.zip.sha256 96B
15、 ruff-i686-unknown-linux-gnu.tar.gz 5.69MB
16、 ruff-i686-unknown-linux-gnu.tar.gz.sha256 101B
17、 ruff-i686-unknown-linux-musl.tar.gz 5.58MB
18、 ruff-i686-unknown-linux-musl.tar.gz.sha256 102B
19、 ruff-powerpc64-unknown-linux-gnu.tar.gz 6.32MB
20、 ruff-powerpc64-unknown-linux-gnu.tar.gz.sha256 106B
21、 ruff-powerpc64le-unknown-linux-gnu.tar.gz 6.18MB
22、 ruff-powerpc64le-unknown-linux-gnu.tar.gz.sha256 108B
23、 ruff-s390x-unknown-linux-gnu.tar.gz 7.22MB
24、 ruff-s390x-unknown-linux-gnu.tar.gz.sha256 102B
25、 ruff-x86_64-apple-darwin.tar.gz 5.66MB
26、 ruff-x86_64-apple-darwin.tar.gz.sha256 98B
27、 ruff-x86_64-pc-windows-msvc.zip 5.62MB
28、 ruff-x86_64-pc-windows-msvc.zip.sha256 98B
29、 ruff-x86_64-unknown-linux-gnu.tar.gz 5.9MB
30、 ruff-x86_64-unknown-linux-gnu.tar.gz.sha256 103B
31、 ruff-x86_64-unknown-linux-musl.tar.gz 5.96MB