-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(pre-commit): update ruff to v0.1.6 #1009
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a6ca397
to
29395fe
Compare
29395fe
to
c283473
Compare
c283473
to
386ca5e
Compare
386ca5e
to
cc945da
Compare
cc945da
to
7e80011
Compare
7e80011
to
3327cc1
Compare
3327cc1
to
d4cd050
Compare
d4cd050
to
158fee5
Compare
ee1caf5
to
a33ca38
Compare
a33ca38
to
bdfcf1e
Compare
bdfcf1e
to
cc37916
Compare
cc37916
to
c5fadb4
Compare
f0cffea
to
dae4e62
Compare
dae4e62
to
845f427
Compare
845f427
to
d63269d
Compare
d63269d
to
d5366b7
Compare
d5366b7
to
f05bda7
Compare
f05bda7
to
4a2c6ce
Compare
4a2c6ce
to
6a35b7f
Compare
1c1fa6f
to
b2c7dc4
Compare
b2c7dc4
to
8726b7c
Compare
8726b7c
to
5f0ee62
Compare
5f0ee62
to
390cd81
Compare
390cd81
to
21cd61b
Compare
21cd61b
to
ff05c80
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.0.272
->v0.1.6
==0.0.272
->==0.1.6
Note: The
pre-commit
manager in Renovate is not supported by thepre-commit
maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.Release Notes
astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)
v0.1.6
Compare Source
v0.1.5
Compare Source
v0.1.4
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.1.4
v0.1.3
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.1.3
v0.1.2
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.1.2
v0.1.1
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.1.1
v0.1.0
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.1.0
v0.0.292
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.292
v0.0.291
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.291
v0.0.290
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.290
v0.0.289
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.289
v0.0.288
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.288
v0.0.287
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.287
v0.0.286
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.286
v0.0.285
Compare Source
See https://github.com/astral-sh/ruff/releases/tag/v0.0.285
v0.0.284
Compare Source
See https://github.com/astral-sh/ruff/releases/tag/v0.0.284
v0.0.283
Compare Source
See https://github.com/astral-sh/ruff/releases/tag/v0.0.283
v0.0.282
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.282
v0.0.281
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.281
v0.0.280
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.280
v0.0.279
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.279
v0.0.278
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.278
v0.0.277
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.277
v0.0.276
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.0.276
v0.0.275
Compare Source
v0.0.274
Compare Source
v0.0.273
Compare Source
astral-sh/ruff (ruff)
v0.1.6
Compare Source
Preview features
flake8-boolean-trap
] Extendboolean-type-hint-positional-argument
(FBT001
) to include booleans in unions (#7501)flake8-pie
] Extendreimplemented-list-builtin
(PIE807
) todict
reimplementations (#8608)flake8-pie
] Extendunnecessary-pass
(PIE790
) to include ellipses (...
) (#8641)flake8-pie
] Implement fix forunnecessary-spread
(PIE800
) (#8668)flake8-quotes
] Implementunnecessary-escaped-quote
(Q004
) (#8630)pycodestyle
] Implement fix formultiple-spaces-after-keyword
(E271
) andmultiple-spaces-before-keyword
(E272
) (#8622)pycodestyle
] Implement fix formultiple-spaces-after-operator
(E222
) andmultiple-spaces-before-operator
(E221
) (#8623)pyflakes
] Extendis-literal
(F632
) to include comparisons against mutable initializers (#8607)pylint
] Implementredefined-argument-from-local
(PLR1704
) (#8159)pylint
] Implement fix forunnecessary-lambda
(PLW0108
) (#8621)refurb
] Implementif-expr-min-max
(FURB136
) (#8664)refurb
] Implementmath-constant
(FURB152
) (#8727)Rule changes
flake8-annotations
] Add autotyping-like return type inference for annotation rules (#8643)flake8-future-annotations
] Implement fix forfuture-required-type-annotation
(FA102
) (#8711)flake8-implicit-namespace-package
] Avoid missing namespace violations in scripts with shebangs (#8710)pydocstyle
] Updateover-indentation
(D208
) to preserve indentation offsets when fixing overindented lines (#8699)pyupgrade
] Refinetimeout-error-alias
(UP041
) to remove false positives (#8587)Formatter
await
formatting with fluent style (#8676)CLI
Configuration
isort
] Support disabling sections withno-sections = true
(#8657)pep8-naming
] Support local and dynamic class- and static-method decorators (#8592)pydocstyle
] Allow overriding pydocstyle convention rules (#8586)Bug fixes
trio.lowlevel
(#8730)PIE794
(#8634)EM
fixes (#7746)whitespace-before-punctuation
(E203
) (#8654)no-self-use
(#8637)PLW0129
(#8675)TYPE_CHECKING
blocks imported fromtyping_extensions
or_typeshed
(#8429)FURB113
autofix if comments are present (#8494)flake8-commas
(#8582)force-sort-within-sections
(#8665)Documentation
v0.1.5
Compare Source
Preview features
flake8-bandit
] Implementmako-templates
(S702
) (#8533)flake8-trio
] ImplementTRIO105
(#8490)flake8-trio
] ImplementTRIO109
(#8534)flake8-trio
] ImplementTRIO110
(#8537)flake8-trio
] ImplementTRIO115
(#8486)refurb
] Implementtype-none-comparison
(FURB169
) (#8487)E721
(#8491)SIM118
fix as safe when the expression is a known dictionary (#8525)Formatter
CLI
--extension
to override inference of source type from file extension (#8373)Configuration
extend_unsafe_fixes
andoverride extend_safe_fixes
(#8444)RUFF_NO_CACHE
environment variable (#8538)Bug fixes
E721
] Flag comparisons tomemoryview
(#8485)D301
autofix foru
prefixed strings (#8495)flake8-trio
rules whentrio
import is present (#8550)TRIO115
violations fortrio.sleep(...)
calls with non-number values (#8532)F841
false negative on assignment to multiple variables (#8489)Documentation
known-first-party
(#8562)project.requires-python
overtarget-version
(#8513)B008
documentation (#8501)v0.1.4
Compare Source
Preview features
flake8-trio
] Implementtimeout-without-await
(TRIO001
) (#8439)numpy
] Implement NumPy 2.0 migration rule (NPY200
) (#7702)pylint
] Implementbad-open-mode
(W1501
) (#8294)pylint
] Implementimport-outside-toplevel
(C0415
) rule (#5180)pylint
] Implementuseless-with-lock
(W2101
) (#8321)pyupgrade
] Implementtimeout-error-alias
(UP041
) (#8476)refurb
] Implementisinstance-type-none
(FURB168
) (#8308)RUF001
,RUF002
, andRUF003
(#4430)Formatter
fmt: skip
(#8273)fmt: off
(#8275)--line-length
option toformat
command (#8363)CLI
--output-format
toruff rule
andruff linter
(#8203)Bug fixes
--force-exclude
inlint.exclude
andformat.exclude
(#8393)--extend-per-file-ignores
on the CLI (#8329)bad-dunder-method-name
to permit__index__
(#8300)D300
when both triple quote styles are present (#8462)FStringRanges
(#8154)shell=True
for truthy, non-True
diagnostics (#8359)NamedTuple
rewrite with starred annotation (#8434)PLE1307
was raised when formatting%c
with characters (#8407)fixedOverflowWidgets
for playground popover (#8458)byte_bounds
as a non-backwards-compatible NumPy 2.0 change (#8474)Internals
--fix
and--diff
(#8316)v0.1.3
Compare Source
This release includes a variety of improvements to the Ruff formatter, removing several known and
unintentional deviations from Black.
Formatter
None
,True
andFalse
(#8189)isort
settings (#8192)isort.force-single-line
is true (#8244)SourceKind::diff
for formatter (#8240)fmt:off
with trailing child comment (#8234)IpyEscapeCommand
(#8207)Linter
pylint
] Add buffer methods tobad-dunder-method-name
(PLW3201
) exclusions (#8190)external
codes setting inunused-noqa
(#8177)line-length
setting for isort in lieu ofpycodestyle.max-line-length
(#8235)unnecessary-paren-on-raise-exception
to unsafe for unknown types (#8231)W605
(#8255)Documentation
unused-noqa
(#8172)external
option tounused-noqa
documentation (#8171)magic-trailing-comma
option in README (#8200)v0.1.2
Compare Source
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.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)E223
,E224
, andE242
(#8143)E225
,E226
,E227
, andE228
(#8136)E252
(#8142)E261
(#8114)E273
andE274
(#8144)E275
(#8133)SIM401
to catch ternary operations (#7415)E721
to allowis
andis
not for direct type comparisons (#7905)Rule changes
backports.strenum
todeprecated-imports
(#8113)SIM112
to ignorehttps_proxy
,http_proxy
, andno_proxy
(#8140)literal-membership
(PLR6201
) to be unsafe (#8097)mutable-argument-defaults
(B006
) to be unsafe (#8108)Formatter
line-ending
default toauto
(#8057)has_own_parentheses
(#8100)--line-length
option fromformat
command (#8131)line-length
documentation (#8150)CLI
ruff format
command in help menus (#8167)ruff version
command with long version display (#8034)Configuration
pycodestyle.max-line-length
option (#8039)Bug fixes
sys.version_info
slices inoutdated-version-block
(#8112)TYPE_CHECKING
blocks (#8072)Documentation
too-many-arguments
lint (#8092)extend-unsafe-fixes
andextend-safe-fixes
example (#8139)flake8-import-conventions
options (#8115)Options
JSON schema description (#8081)pytext
->pytest
) (#8117)magic-value-comparison
example in docs (#8111)v0.1.1
Compare Source
Rule changes
escape-sequence-in-docstring
(D301
) (#7970)Configuration
#(deprecated)
attribute in configuration options (#8035)[format|lint].exclude
options (#8000)tab-size
setting in formatter (#8006)lint.preview
(#8002)Preview features
pylint
] Implementliteral-membership
(PLR6201
) (#7973)pylint
] Implementtoo-many-boolean-expressions
(PLR0916
) (#7975)pylint
] Implementmisplaced-bare-raise
(E0704
) (#7961)pylint
] Implementglobal-at-module-level
(W0604
) (#8058)pylint
] Implementunspecified-encoding
(PLW1514
) (#7939)triple-single-quotes
(D300
) (#7967)Formatter
ruff format
(#7878)--target-version
toruff format
(#8055)in
keyword (#8054)--diff
option toruff format
(#7937)pass
over ellipsis in non-function/class contexts (#8049)Bug fixes
bad-dunder-method-name
for_
(#8015)URLOpen
audit (#8047)iteration-over-set
to preserve whitespace and comments (#8001)Documentation
B005
docs (#8028)--output-format
(#8014)lint.preview
andformat.preview
(#8032)RuleGroup::Preview
. (#7989)v0.1.0
Compare Source
This is the first release which uses the
CHANGELOG
file. See GitHub Releases for prior changelog entries.Read Ruff's new versioning policy.
Breaking changes
format
setting has been removed (#7984)format
setting cannot be used to configure the output format, useoutput-format
insteadRUFF_FORMAT
environment variable is ignored, useRUFF_OUTPUT_FORMAT
instead--format
option has been removed fromruff check
, use--output-format
insteadRule changes
reimplemented-starmap
(FURB140
) to catch calls with a single and starred argument (#7768)RUF015
(#7848)SIM15
to allowopen
followed byclose
(#7916)msgspec.Struct
default-copy semantics inRUF012
(#7786)sqlalchemy
methods to `flake8-boolean-trap`` exclusion list (#7874)PLR1714
(#7910)PIE804
(#7884)PLC0208
(#7887)PYI055
(#7886)non-pep695-type-alias
to require--unsafe-fixes
outside of stub files (#7836)UP018
(#7913)PLW3201
to supportEnum
sunder names (#7987)Preview features
unnecessary-key-check
to simplifykey in dct and dct[key]
todct.get(key)
(#7895)assignment-in-assert
to prevent walrus expressions in assert statements (#7856)refurb
] Addsingle-item-membership-test
(FURB171
) (#7815)pylint
] Addand-or-ternary
(R1706
) (#7811)New rules are added in preview.
Configuration
unsafe-fixes
setting (#7769)extend-safe-fixes
andextend-unsafe-fixes
for promoting and demoting fixes (#7841)CLI
--unsafe-fixes
option for opt-in to display and apply unsafe fixes (#7769)--format
option in warning (#7837)--check
(#7788)check --diff
to include unsafe fix hints (#7790)cell
field to JSON output format (#7664)Safe
,Unsafe
, andDisplay
(#7843)Bug fixes
SIM110
with a yield in the condition (#7801)C414
fixes (#7775)unnecessary-enumerate
len
suggestion (#7781)SIM101
(#7798)E251
false positive inside f-strings (#7894)stdin
(#7789)ruff rule
(#7812)--unfixable
inISC
rules (#7917)PIE804
(#7922)PTH118
forPath.joinpath
with starred arguments (#7852)outdated-version-block
when using greater than comparisons (#7920)gettext
calls (#7898)PLR6301
(#7933)TCH004
(#7968)cache-dir
relative to project root (#7962)TCH003
(#7954)line-length
(#7883)coalesce
keyword (#7876)Documentation
reimplemented-starmap
performance effects (#7846)PLR6301
(#7831)UP038
docs to note that it results in slower code (#7872)unnecessary-subscript-reversal
(#7774)FURB177
example (#7832)Formatter
ruff format
message (#7867)ruff_python_formatter
generate.py comment (#7850)Playground
Quick Fix
action (#7824)v0.0.292
Compare Source
What's Changed
Highlights
This release includes full support for Python 3.12 (out now!), including the new type parameter (PEP 695) and f-string syntaxes (PEP 701).
PEP 701 lifts many of the restrictions on f-strings that existed in the past, allowing for arbitrarily nested f-strings, consistent quote style within f-strings, and more, all of which are now supported by Ruff (thanks to @dhruvmanila in https://github.com/astral-sh/ruff/pull/7376).
Breaking Changes
format.quote-style
no longer affects triple-quoted strings, to align with common conventions as well as the guidance from PEP 8 and PEP 257 (see: https://github.com/astral-sh/ruff/pull/7680).line-too-long
(E501
) now ignores trailing pragma comments (like# type: ignore
and# noqa
) when computing line length (see: https://github.com/astral-sh/ruff/pull/7692). This is similar to flake8-bugbear's methodology for detecting overlong lines, and ensures that adding pragmas like# noqa
does not introduce further lint errors.Rules
refurb
] Implementprint-empty-string
(FURB105
) by @tjkuson in https://github.com/astral-sh/ruff/pull/7617flake8-bandit
] Implementweak-cryptographic-key
(S505
) by @mkniewallner in https://github.com/astral-sh/ruff/pull/7703refurb
] Implementimplicit-cwd
(FURB177
) by @danparizher in https://github.com/astral-sh/ruff/pull/7704unnecessary-pass
(PIE790
) now flags all unnecessarypass
statements; previously, the rule only flaggedpass
statements that followed a docstring in a two-statement body (see: https://github.com/astral-sh/ruff/pull/7697).Settings
lint
section to Ruff configuration by @MichaReiser in https://github.com/astral-sh/ruff/pull/7549explicit-preview-rules
to toggle explicit selection of preview rules by @zanieb in https://github.com/astral-sh/ruff/pull/7390stdout
by @charliermarsh in https://github.com/astral-sh/ruff/pull/7748unnecessary-pass
(PIE790
) to trigger on all unnecessarypass
statements by @tjkuson in https://github.com/astral-sh/ruff/pull/7697Bug Fixes
PT022
autofix by @dhruvmanila in https://github.com/astral-sh/ruff/pull/7613builtin.open()
withPath.open()
if the latter doesn't support all options by @konstin in https://github.com/astral-sh/ruff/pull/7637Expr::Name
checks to rules which useis_logger_candidate
by @qdegraaf in https://github.com/astral-sh/ruff/pull/7521__all__
assignments by @charliermarsh in https://github.com/astral-sh/ruff/pull/7673commented-out-code
by @tjkuson in https://github.com/astral-sh/ruff/pull/7523unnecessary-pass
by @charliermarsh in https://github.com/astral-sh/ruff/pull/7715quadratic-list-summation
by @charliermarsh in https://github.com/astral-sh/ruff/pull/7719NotebookIndex
forDiagnostics
on stdin by @dhruvmanila in https://github.com/astral-sh/ruff/pull/7663LexError
for dedent to incorrect level by @MichaReiser in https://github.com/astral-sh/ruff/pull/7638DeprecatedLogWarn
to check forExpr::Atrribute
calls by @qdegraaf in https://github.com/astral-sh/ruff/pull/7677Other Changes
commented-out-code
(~50-80%) by @charliermarsh in https://github.com/astral-sh/ruff/pull/7706New Contributors
Full Changelog: astral-sh/ruff@v0.0.291...v0.0.292
v0.0.291
Compare Source
What's Changed
Deprecations
The
format
command-line argument and configuration option has been renamed tooutput-format
. While Ruff will continue to respectformat
when passed as a command-line argument or configuration option, this backwards-compatible support will be dropped in a future release. See: https://github.com/astral-sh/ruff/pull/7514.Rules
flake8-bandit
] ImplementS201
:flask-debug-true
by [@mkniewallner](https://togithub.com/mkniewConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.