Micha Reiser
253f5f269a
refactor: Rename FormatStringContinuation
to FormatImplicitConcatenatedString
( #13531 )
2024-09-27 08:24:50 +00:00
Micha Reiser
c046101b79
Fix codeblock dynamic line length calculation for indented examples ( #13523 )
2024-09-27 09:09:07 +02:00
Zanie Blue
7706f561a9
Do not offer an invalid fix for PLR1716 when the comparisons contain parenthesis ( #13527 )
...
Related to https://github.com/astral-sh/ruff/issues/13524
Doesn't offer a valid fix, opting to instead just not offer a fix at
all. If someone points me to a good way to handle parenthesis here I'm
down to try to fix the fix separately, but it looks quite hard.
2024-09-26 19:01:06 +00:00
Henry Jiang
f5e3662446
Remove jemalloc crate when building on AIX ( #13529 )
...
## Summary
Building ruff on AIX breaks on `tiki-jemalloc-sys` due to OS header
incompatibility
## Test Plan
`cargo test`
Co-authored-by: Henry Jiang <henry.jiang1@ibm.com>
2024-09-26 13:20:54 -04:00
Junzhuo ZHOU
a354d9ead6
Expose internal types as public access ( #13509 )
2024-09-26 17:34:30 +02:00
Zanie Blue
58a8e9c511
Fix handling of slices in tuples for FURB118, e.g., x[:, 1]
( #13518 )
...
There was already handling for the singleton `x[:]` case but not the
tuple case.
Closes https://github.com/astral-sh/ruff/issues/13508
2024-09-26 14:20:03 +00:00
ukyen
e83388dcea
Don't raise D208
when last line is non-empty ( #13372 )
...
Co-authored-by: Micha Reiser <micha@reiser.io>
2024-09-26 14:53:21 +02:00
Micha Reiser
ae39ce56c0
Bump version to 0.6.8 ( #13522 )
2024-09-26 14:09:03 +02:00
Micha Reiser
ff2d214e11
Don't skip over imports and other nodes containing nested statements in import collector ( #13521 )
2024-09-26 11:57:05 +00:00
Micha Reiser
9442cd8fae
Parenthesize match..case
if
guards ( #13513 )
2024-09-26 06:44:33 +00:00
Micha Reiser
8012707348
Align formatting of patterns in match-cases with expression formatting in clause headers ( #13510 )
2024-09-26 08:35:22 +02:00
Charlie Marsh
d7ffe46054
Disable the typeset
plugin ( #13517 )
...
## Summary
There seems to be a bad interaction between enabling anchorlinks and the
`typeset` plugin. I think the former is more important than the
latter... so disabling the latter for now.
## Test Plan
Before:

After:

2024-09-25 23:58:35 +00:00
haarisr
7c83af419c
red-knot: Implement the not
operator for all Type
variants ( #13432 )
...
Signed-off-by: haaris <haarisrahman@gmail.com>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2024-09-25 13:44:19 -07:00
Zanie Blue
bbb044ebda
Detect tuples bound to variadic positional arguments i.e. *args
( #13512 )
...
In https://github.com/astral-sh/ruff/pull/13503 , we added supported for
detecting variadic keyword arguments as dictionaries, here we use the
same strategy for detecting variadic positional arguments as tuples.
2024-09-25 10:03:25 -05:00
Zanie Blue
481065238b
Avoid UP028 false negatives with non-reference shadowed bindings of loop variables ( #13504 )
...
Closes https://github.com/astral-sh/ruff/issues/13266
Avoids false negatives for shadowed bindings that aren't actually
references to the loop variable. There are some shadowed bindings we
need to support still, e.g., `del` requires the loop variable to exist.
2024-09-25 10:03:09 -05:00
Zanie Blue
11f06e0d55
Detect SIM910 when using variadic keyword arguments, i.e., **kwargs
( #13503 )
...
Closes https://github.com/astral-sh/ruff/issues/13493
2024-09-25 10:02:59 -05:00
Dylan
f27a8b8c7a
[internal] ComparableExpr
(f)strings and bytes made invariant under concatenation ( #13301 )
2024-09-25 16:58:57 +02:00
Vince van Noort
ca0ae0a484
[pylint] Implement boolean-chained-comparison
(R1716
) ( #13435 )
...
Co-authored-by: Micha Reiser <micha@reiser.io>
2024-09-25 09:14:12 +00:00
TomerBin
be1d5e3368
[red-knot] Add Type::bool
and boolean expression inference ( #13449 )
2024-09-25 00:02:26 +00:00
Simon Brugman
03503f7f56
C401 message missing closing parenthesis ( #13498 )
2024-09-24 14:55:32 +02:00
Charlie Marsh
ff4b6d11fa
Detect basic wildcard imports in ruff analyze graph ( #13486 )
...
## Summary
I guess we can just ignore the `*` entirely for now? This will add the
`__init__.py` for anything that's importing a package.
2024-09-23 18:09:00 -04:00
Charlie Marsh
96e7f3f96f
Exit gracefully on broken pipe errors ( #13485 )
...
## Summary
Closes https://github.com/astral-sh/ruff/issues/13483 .
Closes https://github.com/astral-sh/ruff/issues/13442 .
## Test Plan
```
❯ cargo run analyze graph ../django | head -n 10
Compiling ruff v0.6.7 (/Users/crmarsh/workspace/ruff/crates/ruff)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.63s
Running `target/debug/ruff analyze graph ../django`
warning: `ruff analyze graph` is experimental and may change without warning
{
"/Users/crmarsh/workspace/django/django/__init__.py": [
"/Users/crmarsh/workspace/django/django/apps/__init__.py",
"/Users/crmarsh/workspace/django/django/conf/__init__.py",
"/Users/crmarsh/workspace/django/django/urls/__init__.py",
"/Users/crmarsh/workspace/django/django/utils/log.py",
"/Users/crmarsh/workspace/django/django/utils/version.py"
],
"/Users/crmarsh/workspace/django/django/__main__.py": [
"/Users/crmarsh/workspace/django/django/core/management/__init__.py"
```
2024-09-23 13:48:43 +00:00
Charlie Marsh
90dc7438ee
Avoid panic when analyze graph hits broken pipe ( #13484 )
...
## Summary
I think we should also make the change that @BurntSushi recommended in
the linked issue, but this gets rid of the panic.
See: https://github.com/astral-sh/ruff/issues/13483
See: https://github.com/astral-sh/ruff/issues/13442
## Test Plan
```
warning: `ruff analyze graph` is experimental and may change without warning
{
"/Users/crmarsh/workspace/django/django/__init__.py": [
"/Users/crmarsh/workspace/django/django/apps/__init__.py",
"/Users/crmarsh/workspace/django/django/conf/__init__.py",
"/Users/crmarsh/workspace/django/django/urls/__init__.py",
"/Users/crmarsh/workspace/django/django/utils/log.py",
"/Users/crmarsh/workspace/django/django/utils/version.py"
],
"/Users/crmarsh/workspace/django/django/__main__.py": [
"/Users/crmarsh/workspace/django/django/core/management/__init__.py"
ruff failed
Cause: Broken pipe (os error 32)
```
2024-09-23 09:43:09 -04:00
Micha Reiser
3e99ab141c
Update Salsa ( #13480 )
2024-09-23 14:04:04 +02:00
renovate[bot]
115745a8ac
Update dependency monaco-editor to ^0.52.0 ( #13475 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [monaco-editor](https://redirect.github.com/microsoft/monaco-editor ) |
[`^0.51.0` ->
`^0.52.0`](https://renovatebot.com/diffs/npm/monaco-editor/0.51.0/0.52.0 )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
### Release Notes
<details>
<summary>microsoft/monaco-editor (monaco-editor)</summary>
###
[`v0.52.0`](https://redirect.github.com/microsoft/monaco-editor/blob/HEAD/CHANGELOG.md#0520 )
[Compare
Source](https://redirect.github.com/microsoft/monaco-editor/compare/v0.51.0...v0.52.0 )
- Comment added inside of `IModelContentChangedEvent`
</details>
---
### Configuration
📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
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.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/astral-sh/ruff ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 09:55:12 +02:00
renovate[bot]
8bb59d7216
Update Rust crate unicode_names2 to v1.3.0 ( #13474 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [unicode_names2](https://redirect.github.com/progval/unicode_names2 ) |
workspace.dependencies | minor | `1.2.2` -> `1.3.0` |
---
### Configuration
📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC),
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.
---
- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/ ).
View the [repository job
log](https://developer.mend.io/github/astral-sh/ruff ).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 09:54:44 +02:00
renovate[bot]
47aac060de
Update Rust crate insta to v1.40.0 ( #13472 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-23 09:40:02 +02:00
Steve C
7c55330534
Fix formatting for analyze direction
values ( #13476 )
2024-09-23 09:18:28 +02:00
renovate[bot]
047d77c60b
Update pre-commit dependencies ( #13467 )
2024-09-22 22:54:34 -04:00
renovate[bot]
18fddd458a
Update dependency eslint to v8.57.1 ( #13465 )
2024-09-22 22:54:14 -04:00
Charlie Marsh
db76000521
Use anchorlinks rather than permalinks ( #13471 )
...
## Summary
See: https://github.com/astral-sh/uv/pull/7626
2024-09-23 02:44:45 +00:00
renovate[bot]
a2ed1e1cd1
Update Rust crate thiserror to v1.0.64 ( #13462 )
2024-09-22 22:32:45 -04:00
renovate[bot]
7457679582
Update Rust crate dashmap to v6.1.0 ( #13470 )
2024-09-22 22:32:26 -04:00
renovate[bot]
1d352872ba
Update Rust crate codspeed-criterion-compat to v2.7.2 ( #13469 )
2024-09-22 22:32:20 -04:00
renovate[bot]
c8b905bc96
Update NPM Development dependencies ( #13468 )
2024-09-22 22:32:11 -04:00
renovate[bot]
5b593d0397
Update dependency ruff to v0.6.7 ( #13466 )
2024-09-22 22:32:02 -04:00
renovate[bot]
c5c5acda23
Update Rust crate unicode-normalization to v0.1.24 ( #13464 )
2024-09-22 22:31:53 -04:00
renovate[bot]
26747aae75
Update Rust crate unicode-ident to v1.0.13 ( #13463 )
2024-09-22 22:31:47 -04:00
renovate[bot]
85b825a2a1
Update Rust crate syn to v2.0.77 ( #13461 )
2024-09-22 22:31:40 -04:00
renovate[bot]
9e764ef6d0
Update Rust crate serde_json to v1.0.128 ( #13460 )
2024-09-23 02:03:47 +00:00
renovate[bot]
0e325a53ef
Update Rust crate serde to v1.0.210 ( #13459 )
2024-09-23 02:03:15 +00:00
renovate[bot]
2a136cfb57
Update Rust crate pretty_assertions to v1.4.1 ( #13458 )
2024-09-23 02:02:12 +00:00
renovate[bot]
7749164d4a
Update Rust crate ordermap to v0.5.3 ( #13457 )
2024-09-23 02:01:44 +00:00
renovate[bot]
da50e14524
Update Rust crate lsp-server to v0.7.7 ( #13456 )
2024-09-23 02:00:23 +00:00
renovate[bot]
1886b731a5
Update Rust crate ignore to v0.4.23 ( #13455 )
2024-09-22 22:00:06 -04:00
renovate[bot]
364eddc95a
Update Rust crate globset to v0.4.15 ( #13454 )
2024-09-22 22:00:01 -04:00
renovate[bot]
48fb340e3b
Update Rust crate filetime to v0.2.25 ( #13453 )
2024-09-22 21:59:50 -04:00
renovate[bot]
71bb4d3bdc
Update Rust crate clap to v4.5.18 ( #13452 )
2024-09-22 21:59:44 -04:00
renovate[bot]
5c20f570d0
Update Rust crate anyhow to v1.0.89 ( #13451 )
2024-09-23 01:58:14 +00:00
Charlie Marsh
7441da287f
Skip traversal for non-compound statements ( #13441 )
...
## Summary
None of these can contain imports.
2024-09-21 20:47:30 +00:00