chore(deps): update dependency ruff to >=0.2,<0.6
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| ruff (source, changelog) | >=0.2,<0.5 -> >=0.2,<0.6 |
Release Notes
astral-sh/ruff (ruff)
v0.5.0
Check out the blog post for a migration guide and overview of the changes!
Breaking changes
See also, the "Remapped rules" section which may result in disabled rules.
- Follow the XDG specification to discover user-level configurations on macOS (same as on other Unix platforms)
- Selecting
ALLnow excludes deprecated rules - The released archives now include an extra level of nesting, which can be removed with
--strip-components=1when untarring. - The release artifact's file name no longer includes the version tag. This enables users to install via
/latestURLs on GitHub.
Deprecations
The following rules are now deprecated:
-
syntax-error(E999): Syntax errors are now always shown
Remapped rules
The following rules have been remapped to new rule codes:
-
blocking-http-call-in-async-function:ASYNC100toASYNC210 -
open-sleep-or-subprocess-in-async-function:ASYNC101split intoASYNC220,ASYNC221,ASYNC230, andASYNC251 -
blocking-os-call-in-async-function:ASYNC102has been merged intoASYNC220andASYNC221 -
trio-timeout-without-await:TRIO100toASYNC100 -
trio-sync-call:TRIO105toASYNC105 -
trio-async-function-with-timeout:TRIO109toASYNC109 -
trio-unneeded-sleep:TRIO110toASYNC110 -
trio-zero-sleep-call:TRIO115toASYNC115 -
repeated-isinstance-calls:PLR1701toSIM101
Stabilization
The following rules have been stabilized and are no longer in preview:
-
mutable-fromkeys-value(RUF024) -
default-factory-kwarg(RUF026) -
django-extra(S610) -
manual-dict-comprehension(PERF403) -
print-empty-string(FURB105) -
readlines-in-for(FURB129) -
if-expr-min-max(FURB136) -
bit-count(FURB161) -
redundant-log-base(FURB163) -
regex-flag-alias(FURB167) -
isinstance-type-none(FURB168) -
type-none-comparison(FURB169) -
implicit-cwd(FURB177) -
hashlib-digest-hex(FURB181) -
list-reverse-copy(FURB187) -
bad-open-mode(PLW1501) -
empty-comment(PLR2044) -
global-at-module-level(PLW0604) -
misplaced-bare-raise(PLE0744) -
non-ascii-import-name(PLC2403) -
non-ascii-name(PLC2401) -
nonlocal-and-global(PLE0115) -
potential-index-error(PLE0643) -
redeclared-assigned-name(PLW0128) -
redefined-argument-from-local(PLR1704) -
repeated-keyword-argument(PLE1132) -
super-without-brackets(PLW0245) -
unnecessary-list-index-lookup(PLR1736) -
useless-exception-statement(PLW0133) -
useless-with-lock(PLW2101)
The following behaviors have been stabilized:
-
is-literal(F632) now warns for identity checks against list, set or dictionary literals -
needless-bool(SIM103) now detectsifexpressions with implicitelsebranches -
module-import-not-at-top-of-file(E402) now allowsos.environmodifications between import statements -
type-comparison(E721) now allows idioms such astype(x) is int -
yoda-condition(SIM300) now flags a wider range of expressions
Removals
The following deprecated settings have been removed:
-
output-format=text; useoutput-format=conciseoroutput-format=full -
tab-size; useindent-width
The following deprecated CLI options have been removed:
-
--show-source; use--output-format=full -
--no-show-source; use--output-format=concise
The following deprecated CLI commands have been removed:
-
ruff <path>; useruff check <path> -
ruff --clean; useruff clean -
ruff --generate-shell-completion; useruff generate-shell-completion
Preview features
- [
ruff] Addassert-with-print-messagerule (#11981)
CLI
- Use rule name rather than message in
--statistics(#11697) - Use the output format
fullby default (#12010) - Don't log syntax errors to the console (#11902)
Rule changes
- [
ruff] Fix false positives ifgettextis imported using an alias (RUF027) (#12025) - [
npy] Updatetrapzandin1ddeprecation (NPY201) (#11948) - [
flake8-bandit] Modify diagnostic ranges for shell-related rules (#10667)
Server
- Closing an untitled, unsaved notebook document no longer throws an error (#11942)
- Support the usage of tildes and environment variables in
logFile(#11945) - Add option to configure whether to show syntax errors (#12059)
Bug fixes
- [
pycodestyle] AvoidE203for f-string debug expression (#12024) - [
pep8-naming] Match import-name ignores against both name and alias (N812,N817) (#12033) - [
pyflakes] Detect assignments that shadow definitions (F811) (#11961)
Parser
- Emit a syntax error for an empty type parameter list (#12030)
- Avoid consuming the newline for unterminated strings (#12067)
- Do not include the newline in the unterminated string range (#12017)
- Use the correct range to highlight line continuation errors (#12016)
- Consider 2-character EOL before line continuations (#12035)
- Consider line continuation character for re-lexing (#12008)
Other changes
- Upgrade the Unicode table used for measuring the line-length (#11194)
- Remove the deprecation error message for the nursery selector (#10172)
v0.4.10
Parser
- Implement re-lexing logic for better error recovery (#11845)
Rule changes
- [
flake8-copyright] UpdateCPY001to check the first 4096 bytes instead of 1024 (#11927) - [
pycodestyle] UpdateE999to show all syntax errors instead of just the first one (#11900)
Server
- Add tracing setup guide to Helix documentation (#11883)
- Add tracing setup guide to Neovim documentation (#11884)
- Defer notebook cell deletion to avoid an error message (#11864)
Security
- Guard against malicious ecosystem comment artifacts (#11879)
v0.4.9
Preview features
- [
pylint] Implementconsider-dict-items(C0206) (#11688) - [
refurb] Implementrepeated-global(FURB154) (#11187)
Rule changes
- [
pycodestyle] Adapt fix forE203to work identical toruff format(#10999)
Formatter
- Fix formatter instability for lines only consisting of zero-width characters (#11748)
Server
- Add supported commands in server capabilities (#11850)
- Use real file path when available in
ruff server(#11800) - Improve error message when a command is run on an unavailable document (#11823)
- Introduce the
ruff.printDebugInformationcommand (#11831) - Tracing system now respects log level and trace level, with options to log to a file (#11747)
CLI
- Handle non-printable characters in diff view (#11687)
Bug fixes
Configuration
📅 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 this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.