Dylan
965a4dd731
[`isort`] Check full module path against project root(s) when categorizing first-party ( #16565 )
...
When attempting to determine whether `import foo.bar.baz` is a known
first-party import relative to [user-provided source
paths](https://docs.astral.sh/ruff/settings/#src ), when `preview` is
enabled we now check that `SRC/foo/bar/baz` is a directory or
`SRC/foo/bar/baz.py` or `SRC/foo/bar/baz.pyi` exist.
Previously, we just checked the analogous thing for `SRC/foo`, but this
can be misleading in situations with disjoint namespace packages that
share a common base name (e.g. we may be working inside the namespace
package `foo.buzz` and importing `foo.bar` from elsewhere).
Supersedes #12987
Closes #12984
2025-05-05 11:40:01 -05:00
renovate[bot]
3b15af6d4f
Update dependency ruff to v0.11.8 ( #17839 )
2025-05-05 07:29:36 +02:00
Brent Westbrook
75effb8ed7
Bump 0.11.8 ( #17766 )
2025-05-01 10:19:58 -04:00
Dylan
ae7691b026
Add Python 3.14 to configuration options ( #17647 )
...
A small PR that just updates the various settings/configurations to
allow Python 3.14. At the moment selecting that target version will
have no impact compared to Python 3.13 - except that a warning
is emitted if the user does so with `preview` disabled.
2025-04-28 16:29:00 -05:00
renovate[bot]
b09f00a4ef
Update dependency ruff to v0.11.7 ( #17668 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 08:09:50 +02:00
Dylan
f7b48510b5
Bump 0.11.7 ( #17613 )
2025-04-24 13:06:38 -05:00
renovate[bot]
c077b109ce
Update dependency ruff to v0.11.6 ( #17516 )
2025-04-21 09:49:22 +01:00
Brent Westbrook
fcd50a0496
Bump 0.11.6 ( #17449 )
2025-04-17 09:20:29 -04:00
renovate[bot]
78dabc332d
Update Rust crate clap to v4.5.36 ( #17381 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2025-04-15 16:27:36 +00:00
Dylan
7186d5e9ad
Bump 0.11.5 ( #17337 )
2025-04-10 11:57:44 -05:00
renovate[bot]
27ecf350d8
Update Rust crate clap to v4.5.35 ( #17273 )
...
This PR contains the following updates:
| Package | Type | Update | Change |
|---|---|---|---|
| [clap](https://redirect.github.com/clap-rs/clap ) |
workspace.dependencies | patch | `4.5.34` -> `4.5.35` |
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>clap-rs/clap (clap)</summary>
###
[`v4.5.35`](https://redirect.github.com/clap-rs/clap/blob/HEAD/CHANGELOG.md#4535---2025-04-01 )
[Compare
Source](https://redirect.github.com/clap-rs/clap/compare/v4.5.34...v4.5.35 )
##### Fixes
- *(help)* Align positionals and flags when put in the same
`help_heading`
- *(help)* Don't leave space for shorts if there are none
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMjcuMyIsInVwZGF0ZWRJblZlciI6IjM5LjIyNy4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Micha Reiser <micha@reiser.io>
2025-04-07 14:25:05 +00:00
Bruno Alla
708b84fb87
[docs] fix formatting of "See Style Guide" link ( #17272 )
...
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
Minor formatting tweak in the docs. Looks like the link is meant to be
italic (others "See XXXX" are), but the opening underscore isn't closed
so it's displayed in the rendered version:
https://docs.astral.sh/ruff/formatter/#philosophy

## Test Plan
<!-- How was it tested? -->
2025-04-07 12:43:26 +00:00
Brent Westbrook
95d6ed40cc
Bump 0.11.4 ( #17212 )
2025-04-04 14:09:10 -04:00
Brent Westbrook
755ece0c36
Bump 0.11.3 ( #17173 )
2025-04-03 09:05:40 -04:00
Brent Westbrook
4773878ee7
Bump 0.11.2 ( #16896 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-03-21 09:17:07 -04:00
Dylan
c1971fdde2
Bump 0.11.1 ( #16871 )
2025-03-20 09:50:46 -05:00
Josh Cannon
861931795c
Add `--exit-non-zero-on-format` ( #16009 )
...
## Summary
Fixes #8191 by introducing `--exit-non-zero-on-format` to `ruff format`
which pretty much does what it says on the tin.
## Test Plan
Added a new test!
---------
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
2025-03-19 10:55:05 -04:00
Charlie Marsh
4d3a5afea5
Update Ruff tutorial to avoid non-existent fix in `__init__.py` ( #16818 )
...
## Summary
There were some other stale references too.
Closes https://github.com/astral-sh/ruff/issues/16805 .
2025-03-17 23:45:12 -04:00
Micha Reiser
2cd25ef641
Ruff 0.11.0 ( #16723 )
...
## Summary
Follow-up release for Ruff v0.10 that now includes the following two
changes that we intended to ship but slipped:
* Changes to how the Python version is inferred when a `target-version`
is not specified (#16319 )
* `blanket-noqa` (`PGH004`): Also detect blanked file-level noqa
comments (and not just line level comments).
## Test plan
I verified that the binary built on this branch respects the
`requires-python` setting
([logs](https://www.diffchecker.com/qyJWYi6W/ ), left: v0.10, right:
v0.11)
2025-03-14 13:57:56 +01:00
Micha Reiser
27e9d1fe3e
Ruff v0.10 Release ( #16708 )
...
Co-authored-by: dylwil3 <dylwil3@gmail.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2025-03-13 13:53:11 -04:00
Brent Westbrook
acf35c55f8
Add new `noqa` specification to the docs ( #16703 )
...
## Summary
Adds @dylwil3's new `noqa` specification to the linter `Error
suppression` page instead of the release blog post. Originally taken
from his PR comment
[here](https://github.com/astral-sh/ruff/pull/16483#issuecomment-2711985479 ).
## Test Plan
None
2025-03-13 12:48:53 -04:00
Dylan
b9b256209b
describe requires-python fallback in docs ( #16704 )
...
Adds description of `requires-python` fallback to documentation for
configuration file discovery.
---------
Co-authored-by: Micha Reiser <micha@reiser.io>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
2025-03-13 11:48:12 -05:00
Dhruv Manilawala
f19cb86c5d
Update migration guide with the new `ruff.configuration` ( #16567 )
...
## Summary
This PR updates the migration guide to use the new `ruff.configuration`
settings update to provide a better experience.
### Preview
<details><summary>Migration page screenshot</summary>
<p>

</p>
</details>
2025-03-10 11:50:06 +00:00
renovate[bot]
b02a42d99a
Update dependency ruff to v0.9.10 ( #16593 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff )
([source](https://redirect.github.com/astral-sh/ruff ),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md ))
| `==0.9.9` -> `==0.9.10` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>astral-sh/ruff (ruff)</summary>
###
[`v0.9.10`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#0910 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.9.9...0.9.10 )
##### Preview features
- \[`ruff`] Add new rule `RUF059`: Unused unpacked assignment
([#​16449](https://redirect.github.com/astral-sh/ruff/pull/16449 ))
- \[`syntax-errors`] Detect assignment expressions before Python 3.8
([#​16383](https://redirect.github.com/astral-sh/ruff/pull/16383 ))
- \[`syntax-errors`] Named expressions in decorators before Python 3.9
([#​16386](https://redirect.github.com/astral-sh/ruff/pull/16386 ))
- \[`syntax-errors`] Parenthesized keyword argument names after Python
3.8
([#​16482](https://redirect.github.com/astral-sh/ruff/pull/16482 ))
- \[`syntax-errors`] Positional-only parameters before Python 3.8
([#​16481](https://redirect.github.com/astral-sh/ruff/pull/16481 ))
- \[`syntax-errors`] Tuple unpacking in `return` and `yield` before
Python 3.8
([#​16485](https://redirect.github.com/astral-sh/ruff/pull/16485 ))
- \[`syntax-errors`] Type parameter defaults before Python 3.13
([#​16447](https://redirect.github.com/astral-sh/ruff/pull/16447 ))
- \[`syntax-errors`] Type parameter lists before Python 3.12
([#​16479](https://redirect.github.com/astral-sh/ruff/pull/16479 ))
- \[`syntax-errors`] `except*` before Python 3.11
([#​16446](https://redirect.github.com/astral-sh/ruff/pull/16446 ))
- \[`syntax-errors`] `type` statements before Python 3.12
([#​16478](https://redirect.github.com/astral-sh/ruff/pull/16478 ))
##### Bug fixes
- Escape template filenames in glob patterns in configuration
([#​16407](https://redirect.github.com/astral-sh/ruff/pull/16407 ))
- \[`flake8-simplify`] Exempt unittest context methods for `SIM115` rule
([#​16439](https://redirect.github.com/astral-sh/ruff/pull/16439 ))
- Formatter: Fix syntax error location in notebooks
([#​16499](https://redirect.github.com/astral-sh/ruff/pull/16499 ))
- \[`pyupgrade`] Do not offer fix when at least one target is
`global`/`nonlocal` (`UP028`)
([#​16451](https://redirect.github.com/astral-sh/ruff/pull/16451 ))
- \[`flake8-builtins`] Ignore variables matching module attribute names
(`A001`)
([#​16454](https://redirect.github.com/astral-sh/ruff/pull/16454 ))
- \[`pylint`] Convert `code` keyword argument to a positional argument
in fix for (`PLR1722`)
([#​16424](https://redirect.github.com/astral-sh/ruff/pull/16424 ))
##### CLI
- Move rule code from `description` to `check_name` in GitLab output
serializer
([#​16437](https://redirect.github.com/astral-sh/ruff/pull/16437 ))
##### Documentation
- \[`pydocstyle`] Clarify that `D417` only checks docstrings with an
arguments section
([#​16494](https://redirect.github.com/astral-sh/ruff/pull/16494 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xODUuNCIsInVwZGF0ZWRJblZlciI6IjM5LjE4NS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-10 09:24:24 +01:00
Dylan
0dfa810e9a
Bump 0.9.10 ( #16556 )
2025-03-07 09:00:08 -06:00
renovate[bot]
5efcfd3414
Update dependency ruff to v0.9.9 ( #16464 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff )
([source](https://redirect.github.com/astral-sh/ruff ),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md ))
| `==0.9.7` -> `==0.9.9` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>astral-sh/ruff (ruff)</summary>
###
[`v0.9.9`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#099 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.9.8...0.9.9 )
##### Preview features
- Fix caching of unsupported-syntax errors
([#​16425](https://redirect.github.com/astral-sh/ruff/pull/16425 ))
##### Bug fixes
- Only show unsupported-syntax errors in editors when preview mode is
enabled
([#​16429](https://redirect.github.com/astral-sh/ruff/pull/16429 ))
###
[`v0.9.8`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#098 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.9.7...0.9.8 )
##### Preview features
- Start detecting version-related syntax errors in the parser
([#​16090](https://redirect.github.com/astral-sh/ruff/pull/16090 ))
##### Rule changes
- \[`pylint`] Mark fix unsafe (`PLW1507`)
([#​16343](https://redirect.github.com/astral-sh/ruff/pull/16343 ))
- \[`pylint`] Catch `case np.nan`/`case math.nan` in `match` statements
(`PLW0177`)
([#​16378](https://redirect.github.com/astral-sh/ruff/pull/16378 ))
- \[`ruff`] Add more Pydantic models variants to the list of default
copy semantics (`RUF012`)
([#​16291](https://redirect.github.com/astral-sh/ruff/pull/16291 ))
##### Server
- Avoid indexing the project if `configurationPreference` is
`editorOnly`
([#​16381](https://redirect.github.com/astral-sh/ruff/pull/16381 ))
- Avoid unnecessary info at non-trace server log level
([#​16389](https://redirect.github.com/astral-sh/ruff/pull/16389 ))
- Expand `ruff.configuration` to allow inline config
([#​16296](https://redirect.github.com/astral-sh/ruff/pull/16296 ))
- Notify users for invalid client settings
([#​16361](https://redirect.github.com/astral-sh/ruff/pull/16361 ))
##### Configuration
- Add `per-file-target-version` option
([#​16257](https://redirect.github.com/astral-sh/ruff/pull/16257 ))
##### Bug fixes
- \[`refurb`] Do not consider docstring(s) (`FURB156`)
([#​16391](https://redirect.github.com/astral-sh/ruff/pull/16391 ))
- \[`flake8-self`] Ignore attribute accesses on instance-like variables
(`SLF001`)
([#​16149](https://redirect.github.com/astral-sh/ruff/pull/16149 ))
- \[`pylint`] Fix false positives, add missing methods, and support
positional-only parameters (`PLE0302`)
([#​16263](https://redirect.github.com/astral-sh/ruff/pull/16263 ))
- \[`flake8-pyi`] Mark `PYI030` fix unsafe when comments are deleted
([#​16322](https://redirect.github.com/astral-sh/ruff/pull/16322 ))
##### Documentation
- Fix example for `S611`
([#​16316](https://redirect.github.com/astral-sh/ruff/pull/16316 ))
- Normalize inconsistent markdown headings in docstrings
([#​16364](https://redirect.github.com/astral-sh/ruff/pull/16364 ))
- Document MSRV policy
([#​16384](https://redirect.github.com/astral-sh/ruff/pull/16384 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-03 13:11:13 +05:30
Micha Reiser
091d0af2ab
Bump version to Ruff 0.9.9 ( #16434 )
2025-02-28 10:17:38 +01:00
Brent Westbrook
568cf88c6c
Bump version to 0.9.8 ( #16414 )
2025-02-27 08:56:11 -05:00
Carl Meyer
592532738f
document MSRV policy ( #16384 )
...
This documents our minimum supported Rust version policy. See
https://github.com/astral-sh/ruff/issues/16370
2025-02-26 07:09:23 -08:00
Dhruv Manilawala
be03cb04c1
Expand `ruff.configuration` to allow inline config ( #16296 )
...
## Summary
[Internal design
document](https://www.notion.so/astral-sh/In-editor-settings-19e48797e1ca807fa8c2c91b689d9070?pvs=4 )
This PR expands `ruff.configuration` to allow inline configuration
directly in the editor. For example:
```json
{
"ruff.configuration": {
"line-length": 100,
"lint": {
"unfixable": ["F401"],
"flake8-tidy-imports": {
"banned-api": {
"typing.TypedDict": {
"msg": "Use `typing_extensions.TypedDict` instead"
}
}
}
},
"format": {
"quote-style": "single"
}
}
}
```
This means that now `ruff.configuration` accepts either a path to
configuration file or the raw config itself. It's _mostly_ similar to
`--config` with one difference that's highlighted in the following
section. So, it can be said that the format of `ruff.configuration` when
provided the config map is same as the one on the [playground] [^1].
## Limitations
<details><summary><b>Casing (<code>kebab-case</code> v/s/
<code>camelCase</code>)</b></summary>
<p>
The config keys needs to be in `kebab-case` instead of `camelCase` which
is being used for other settings in the editor.
This could be a bit confusing. For example, the `line-length` option can
be set directly via an editor setting or can be configured via
`ruff.configuration`:
```json
{
"ruff.configuration": {
"line-length": 100
},
"ruff.lineLength": 120
}
```
#### Possible solution
We could use feature flag with [conditional
compilation](https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute )
to indicate that when used in `ruff_server`, we need the `Options`
fields to be renamed as `camelCase` while for other crates it needs to
be renamed as `kebab-case`. But, this might not work very easily because
it will require wrapping the `Options` struct and create two structs in
which we'll have to add `#[cfg_attr(...)]` because otherwise `serde`
will complain:
```
error: duplicate serde attribute `rename_all`
--> crates/ruff_workspace/src/options.rs:43:38
|
43 | #[cfg_attr(feature = "editor", serde(rename_all = "camelCase"))]
| ^^^^^^^^^^
```
</p>
</details>
<details><summary><b>Nesting (flat v/s nested keys)</b></summary>
<p>
This is the major difference between `--config` flag on the command-line
v/s `ruff.configuration` and it makes it such that `ruff.configuration`
has same value format as [playground] [^1].
The config keys needs to be split up into keys which can result in
nested structure instead of flat structure:
So, the following **won't work**:
```json
{
"ruff.configuration": {
"format.quote-style": "single",
"lint.flake8-tidy-imports.banned-api.\"typing.TypedDict\".msg": "Use `typing_extensions.TypedDict` instead"
}
}
```
But, instead it would need to be split up like the following:
```json
{
"ruff.configuration": {
"format": {
"quote-style": "single"
},
"lint": {
"flake8-tidy-imports": {
"banned-api": {
"typing.TypedDict": {
"msg": "Use `typing_extensions.TypedDict` instead"
}
}
}
}
}
}
```
#### Possible solution (1)
The way we could solve this and make it same as `--config` would be to
add a manual logic of converting the JSON map into an equivalent TOML
string which would be then parsed into `Options`.
So, the following JSON map:
```json
{ "lint.flake8-tidy-imports": { "banned-api": {"\"typing.TypedDict\".msg": "Use typing_extensions.TypedDict instead"}}}
```
would need to be converted into the following TOML string:
```toml
lint.flake8-tidy-imports = { banned-api = { "typing.TypedDict".msg = "Use typing_extensions.TypedDict instead" } }
```
by recursively convering `"key": value` into `key = value` which is to
remove the quotes from key and replacing `:` with `=`.
#### Possible solution (2)
Another would be to just accept `Map<String, String>` strictly and
convert it into `key = value` and then parse it as a TOML string. This
would also match `--config` but quotes might become a nuisance because
JSON only allows double quotes and so it'll require escaping any inner
quotes or use single quotes.
</p>
</details>
## Test Plan
### VS Code
**Requires https://github.com/astral-sh/ruff-vscode/pull/702 **
**`settings.json`**:
```json
{
"ruff.lint.extendSelect": ["TID"],
"ruff.configuration": {
"line-length": 50,
"format": {
"quote-style": "single"
},
"lint": {
"unfixable": ["F401"],
"flake8-tidy-imports": {
"banned-api": {
"typing.TypedDict": {
"msg": "Use `typing_extensions.TypedDict` instead"
}
}
}
}
}
}
```
Following video showcases me doing the following:
1. Check diagnostics that it includes `TID`
2. Run `Ruff: Fix all auto-fixable problems` to test `unfixable`
3. Run `Format: Document` to test `line-length` and `quote-style`
https://github.com/user-attachments/assets/0a38176f-3fb0-4960-a213-73b2ea5b1180
### Neovim
**`init.lua`**:
```lua
require('lspconfig').ruff.setup {
init_options = {
settings = {
lint = {
extendSelect = { 'TID' },
},
configuration = {
['line-length'] = 50,
format = {
['quote-style'] = 'single',
},
lint = {
unfixable = { 'F401' },
['flake8-tidy-imports'] = {
['banned-api'] = {
['typing.TypedDict'] = {
msg = 'Use typing_extensions.TypedDict instead',
},
},
},
},
},
},
},
}
```
Same steps as in the VS Code test:
https://github.com/user-attachments/assets/cfe49a9b-9a89-43d7-94f2-7f565d6e3c9d
## Documentation Preview
https://github.com/user-attachments/assets/e0062f58-6ec8-4e01-889d-fac76fd8b3c7
[playground]: https://play.ruff.rs
[^1]: This has one advantage that the value can be copy-pasted directly
into the playground
2025-02-26 10:17:11 +05:30
renovate[bot]
222588645b
Update dependency ruff to v0.9.7 ( #16336 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff )
([source](https://redirect.github.com/astral-sh/ruff ),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md ))
| `==0.9.6` -> `==0.9.7` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>astral-sh/ruff (ruff)</summary>
###
[`v0.9.7`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#097 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.9.6...0.9.7 )
##### Preview features
- Consider `__new__` methods as special function type for enforcing
class method or static method rules
([#​13305](https://redirect.github.com/astral-sh/ruff/pull/13305 ))
- \[`airflow`] Improve the internal logic to differentiate deprecated
symbols (`AIR303`)
([#​16013](https://redirect.github.com/astral-sh/ruff/pull/16013 ))
- \[`refurb`] Manual timezone monkeypatching (`FURB162`)
([#​16113](https://redirect.github.com/astral-sh/ruff/pull/16113 ))
- \[`ruff`] Implicit class variable in dataclass (`RUF045`)
([#​14349](https://redirect.github.com/astral-sh/ruff/pull/14349 ))
- \[`ruff`] Skip singleton starred expressions for
`incorrectly-parenthesized-tuple-in-subscript` (`RUF031`)
([#​16083](https://redirect.github.com/astral-sh/ruff/pull/16083 ))
- \[`refurb`] Check for subclasses includes subscript expressions
(`FURB189`)
([#​16155](https://redirect.github.com/astral-sh/ruff/pull/16155 ))
##### Rule changes
- \[`flake8-comprehensions`]: Handle trailing comma in `C403` fix
([#​16110](https://redirect.github.com/astral-sh/ruff/pull/16110 ))
- \[`flake8-debugger`] Also flag `sys.breakpointhook` and
`sys.__breakpointhook__` (`T100`)
([#​16191](https://redirect.github.com/astral-sh/ruff/pull/16191 ))
- \[`pydocstyle`] Handle arguments with the same names as sections
(`D417`)
([#​16011](https://redirect.github.com/astral-sh/ruff/pull/16011 ))
- \[`pylint`] Correct ordering of arguments in fix for `if-stmt-min-max`
(`PLR1730`)
([#​16080](https://redirect.github.com/astral-sh/ruff/pull/16080 ))
- \[`pylint`] Do not offer fix for raw strings (`PLE251`)
([#​16132](https://redirect.github.com/astral-sh/ruff/pull/16132 ))
- \[`pyupgrade`] Do not upgrade functional `TypedDicts` with private
field names to the class-based syntax (`UP013`)
([#​16219](https://redirect.github.com/astral-sh/ruff/pull/16219 ))
- \[`pyupgrade`] Handle micro version numbers correctly (`UP036`)
([#​16091](https://redirect.github.com/astral-sh/ruff/pull/16091 ))
- \[`pyupgrade`] Unwrap unary expressions correctly (`UP018`)
([#​15919](https://redirect.github.com/astral-sh/ruff/pull/15919 ))
- \[`ruff`] Skip `RUF001` diagnostics when visiting string type
definitions
([#​16122](https://redirect.github.com/astral-sh/ruff/pull/16122 ))
- \[`flake8-pyi`] Avoid flagging `custom-typevar-for-self` on metaclass
methods (`PYI019`)
([#​16141](https://redirect.github.com/astral-sh/ruff/pull/16141 ))
- \[`pycodestyle`] Exempt `site.addsitedir(...)` calls (`E402`)
([#​16251](https://redirect.github.com/astral-sh/ruff/pull/16251 ))
##### Formatter
- Fix unstable formatting of trailing end-of-line comments of
parenthesized attribute values
([#​16187](https://redirect.github.com/astral-sh/ruff/pull/16187 ))
##### Server
- Fix handling of requests received after shutdown message
([#​16262](https://redirect.github.com/astral-sh/ruff/pull/16262 ))
- Ignore `source.organizeImports.ruff` and `source.fixAll.ruff` code
actions for a notebook cell
([#​16154](https://redirect.github.com/astral-sh/ruff/pull/16154 ))
- Include document specific debug info for `ruff.printDebugInformation`
([#​16215](https://redirect.github.com/astral-sh/ruff/pull/16215 ))
- Update server to return the debug info as string with
`ruff.printDebugInformation`
([#​16214](https://redirect.github.com/astral-sh/ruff/pull/16214 ))
##### CLI
- Warn on invalid `noqa` even when there are no diagnostics
([#​16178](https://redirect.github.com/astral-sh/ruff/pull/16178 ))
- Better error messages while loading configuration `extend`s
([#​15658](https://redirect.github.com/astral-sh/ruff/pull/15658 ))
##### Bug fixes
- \[`refurb`] Correctly handle lengths of literal strings in
`slice-to-remove-prefix-or-suffix` (`FURB188`)
([#​16237](https://redirect.github.com/astral-sh/ruff/pull/16237 ))
##### Documentation
- Add FAQ entry for `source.*` code actions in Notebook
([#​16212](https://redirect.github.com/astral-sh/ruff/pull/16212 ))
- Add `SECURITY.md`
([#​16224](https://redirect.github.com/astral-sh/ruff/pull/16224 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 12:01:55 +05:30
Brent Westbrook
54fccb3ee2
Bump version to 0.9.7 ( #16271 )
2025-02-20 08:12:11 -05:00
Alex Waygood
5cd0de3e4c
Fix minor punctuation errors ( #16228 )
...
Co-authored-by: eqsdxr <rxdsqe@gmail.com>
2025-02-18 12:24:57 +00:00
Dhruv Manilawala
b5cd4f2f70
Add FAQ entry for `source.*` code actions in Notebook ( #16212 )
...
## Summary
This PR adds a FAQ entry to provide a brief explanation on why Ruff does
not support `source.*` code actions for Notebook.
2025-02-17 20:04:33 +05:30
renovate[bot]
f3d1bf845e
Update dependency ruff to v0.9.6 ( #16197 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff )
([source](https://redirect.github.com/astral-sh/ruff ),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md ))
| `==0.9.5` -> `==0.9.6` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>astral-sh/ruff (ruff)</summary>
###
[`v0.9.6`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#096 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.9.5...0.9.6 )
##### Preview features
- \[`airflow`] Add `external_task.{ExternalTaskMarker,
ExternalTaskSensor}` for `AIR302`
([#​16014](https://redirect.github.com/astral-sh/ruff/pull/16014 ))
- \[`flake8-builtins`] Make strict module name comparison optional
(`A005`)
([#​15951](https://redirect.github.com/astral-sh/ruff/pull/15951 ))
- \[`flake8-pyi`] Extend fix to Python <= 3.9 for
`redundant-none-literal` (`PYI061`)
([#​16044](https://redirect.github.com/astral-sh/ruff/pull/16044 ))
- \[`pylint`] Also report when the object isn't a literal (`PLE1310`)
([#​15985](https://redirect.github.com/astral-sh/ruff/pull/15985 ))
- \[`ruff`] Implement `indented-form-feed` (`RUF054`)
([#​16049](https://redirect.github.com/astral-sh/ruff/pull/16049 ))
- \[`ruff`] Skip type definitions for `missing-f-string-syntax`
(`RUF027`)
([#​16054](https://redirect.github.com/astral-sh/ruff/pull/16054 ))
##### Rule changes
- \[`flake8-annotations`] Correct syntax for `typing.Union` in suggested
return type fixes for `ANN20x` rules
([#​16025](https://redirect.github.com/astral-sh/ruff/pull/16025 ))
- \[`flake8-builtins`] Match upstream module name comparison (`A005`)
([#​16006](https://redirect.github.com/astral-sh/ruff/pull/16006 ))
- \[`flake8-comprehensions`] Detect overshadowed `list`/`set`/`dict`,
ignore variadics and named expressions (`C417`)
([#​15955](https://redirect.github.com/astral-sh/ruff/pull/15955 ))
- \[`flake8-pie`] Remove following comma correctly when the unpacked
dictionary is empty (`PIE800`)
([#​16008](https://redirect.github.com/astral-sh/ruff/pull/16008 ))
- \[`flake8-simplify`] Only trigger `SIM401` on known dictionaries
([#​15995](https://redirect.github.com/astral-sh/ruff/pull/15995 ))
- \[`pylint`] Do not report calls when object type and argument type
mismatch, remove custom escape handling logic (`PLE1310`)
([#​15984](https://redirect.github.com/astral-sh/ruff/pull/15984 ))
- \[`pyupgrade`] Comments within parenthesized value ranges should not
affect applicability (`UP040`)
([#​16027](https://redirect.github.com/astral-sh/ruff/pull/16027 ))
- \[`pyupgrade`] Don't introduce invalid syntax when upgrading old-style
type aliases with parenthesized multiline values (`UP040`)
([#​16026](https://redirect.github.com/astral-sh/ruff/pull/16026 ))
- \[`pyupgrade`] Ensure we do not rename two type parameters to the same
name (`UP049`)
([#​16038](https://redirect.github.com/astral-sh/ruff/pull/16038 ))
- \[`pyupgrade`] \[`ruff`] Don't apply renamings if the new name is
shadowed in a scope of one of the references to the binding (`UP049`,
`RUF052`)
([#​16032](https://redirect.github.com/astral-sh/ruff/pull/16032 ))
- \[`ruff`] Update `RUF009` to behave similar to `B008` and ignore
attributes with immutable types
([#​16048](https://redirect.github.com/astral-sh/ruff/pull/16048 ))
##### Server
- Root exclusions in the server to project root
([#​16043](https://redirect.github.com/astral-sh/ruff/pull/16043 ))
##### Bug fixes
- \[`flake8-datetime`] Ignore `.replace()` calls while looking for
`.astimezone`
([#​16050](https://redirect.github.com/astral-sh/ruff/pull/16050 ))
- \[`flake8-type-checking`] Avoid `TC004` false positive where the
runtime definition is provided by `__getattr__`
([#​16052](https://redirect.github.com/astral-sh/ruff/pull/16052 ))
##### Documentation
- Improve `ruff-lsp` migration document
([#​16072](https://redirect.github.com/astral-sh/ruff/pull/16072 ))
- Undeprecate `ruff.nativeServer`
([#​16039](https://redirect.github.com/astral-sh/ruff/pull/16039 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjE2Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-17 08:21:29 +01:00
Dhruv Manilawala
524cf6e515
Bump version to 0.9.6 ( #16074 )
2025-02-10 18:14:04 +05:30
Dhruv Manilawala
0f1eb1e2fc
Improve migration document ( #16072 )
...
## Summary
This PR improves the migration document based on recent feedback.
[Rendered
version](https://github.com/astral-sh/ruff/blob/dhruv/migration/docs/editors/migration.md )
### Preview
<img width="1897" alt="Screenshot 2025-02-10 at 2 52 31 PM"
src="https://github.com/user-attachments/assets/596a3217-6598-4274-ab49-a89b9cb60fe0 "
/>
2025-02-10 16:30:03 +05:30
renovate[bot]
8fb69d3b05
Update dependency ruff to v0.9.5 ( #16062 )
2025-02-09 21:29:05 -05:00
Dhruv Manilawala
1f3ff48b4f
Undeprecate `ruff.nativeServer` ( #16039 )
...
Related to https://github.com/astral-sh/ruff-vscode/pull/684 .
2025-02-08 22:29:07 +05:30
Dylan
10d3e64ccd
Bump version to 0.9.5 ( #16002 )
2025-02-06 13:24:45 -06:00
Dhruv Manilawala
b66cc94f9b
Add deprecation warning for `ruff-lsp` related settings ( #15850 )
...
## Summary
This PR updates the documentation to add deprecated warning for
`ruff-lsp` specific settings
### Preview
https://github.com/user-attachments/assets/64e11e4b-7178-43ab-be5b-421e7f4689de
## Test Plan
Build the documentation locally and test out the links. Refer to the
preview video above.
2025-02-06 20:12:41 +05:30
Alexander Nordin
9d83e76a3b
Docs (`linter.md`): clarify that Python files are always searched for in subdirectories ( #15882 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-02-04 15:36:16 +00:00
Micha Reiser
ff87ea8d42
Update black deviations ( #15928 )
2025-02-04 14:04:24 +00:00
renovate[bot]
c81f6c0bd2
Update dependency mdformat to v0.7.22 ( #15896 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mdformat](https://redirect.github.com/hukkin/mdformat )
([changelog](https://mdformat.readthedocs.io/en/stable/users/changelog.html ))
| `==0.7.21` -> `==0.7.22` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>hukkin/mdformat (mdformat)</summary>
###
[`v0.7.22`](https://redirect.github.com/hukkin/mdformat/compare/0.7.21...0.7.22 )
[Compare
Source](https://redirect.github.com/hukkin/mdformat/compare/0.7.21...0.7.22 )
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNDUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-03 12:24:31 +05:30
renovate[bot]
a53626a8b2
Update dependency ruff to v0.9.4 ( #15897 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff )
([source](https://redirect.github.com/astral-sh/ruff ),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md ))
| `==0.9.3` -> `==0.9.4` |
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
[](https://docs.renovatebot.com/merge-confidence/ )
|
---
> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.
---
### Release Notes
<details>
<summary>astral-sh/ruff (ruff)</summary>
###
[`v0.9.4`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#094 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.9.3...0.9.4 )
##### Preview features
- \[`airflow`] Extend airflow context parameter check for
`BaseOperator.execute` (`AIR302`)
([#​15713](https://redirect.github.com/astral-sh/ruff/pull/15713 ))
- \[`airflow`] Update `AIR302` to check for deprecated context keys
([#​15144](https://redirect.github.com/astral-sh/ruff/pull/15144 ))
- \[`flake8-bandit`] Permit suspicious imports within stub files (`S4`)
([#​15822](https://redirect.github.com/astral-sh/ruff/pull/15822 ))
- \[`pylint`] Do not trigger `PLR6201` on empty collections
([#​15732](https://redirect.github.com/astral-sh/ruff/pull/15732 ))
- \[`refurb`] Do not emit diagnostic when loop variables are used
outside loop body (`FURB122`)
([#​15757](https://redirect.github.com/astral-sh/ruff/pull/15757 ))
- \[`ruff`] Add support for more `re` patterns (`RUF055`)
([#​15764](https://redirect.github.com/astral-sh/ruff/pull/15764 ))
- \[`ruff`] Check for shadowed `map` before suggesting fix (`RUF058`)
([#​15790](https://redirect.github.com/astral-sh/ruff/pull/15790 ))
- \[`ruff`] Do not emit diagnostic when all arguments to `zip()` are
variadic (`RUF058`)
([#​15744](https://redirect.github.com/astral-sh/ruff/pull/15744 ))
- \[`ruff`] Parenthesize fix when argument spans multiple lines for
`unnecessary-round` (`RUF057`)
([#​15703](https://redirect.github.com/astral-sh/ruff/pull/15703 ))
##### Rule changes
- Preserve quote style in generated code
([#​15726](https://redirect.github.com/astral-sh/ruff/pull/15726 ),
[#​15778](https://redirect.github.com/astral-sh/ruff/pull/15778 ),
[#​15794](https://redirect.github.com/astral-sh/ruff/pull/15794 ))
- \[`flake8-bugbear`] Exempt `NewType` calls where the original type is
immutable (`B008`)
([#​15765](https://redirect.github.com/astral-sh/ruff/pull/15765 ))
- \[`pylint`] Honor banned top-level imports by `TID253` in `PLC0415`.
([#​15628](https://redirect.github.com/astral-sh/ruff/pull/15628 ))
- \[`pyupgrade`] Ignore `is_typeddict` and `TypedDict` for
`deprecated-import` (`UP035`)
([#​15800](https://redirect.github.com/astral-sh/ruff/pull/15800 ))
##### CLI
- Fix formatter warning message for `flake8-quotes` option
([#​15788](https://redirect.github.com/astral-sh/ruff/pull/15788 ))
- Implement tab autocomplete for `ruff config`
([#​15603](https://redirect.github.com/astral-sh/ruff/pull/15603 ))
##### Bug fixes
- \[`flake8-comprehensions`] Do not emit `unnecessary-map` diagnostic
when lambda has different arity (`C417`)
([#​15802](https://redirect.github.com/astral-sh/ruff/pull/15802 ))
- \[`flake8-comprehensions`] Parenthesize `sorted` when needed for
`unnecessary-call-around-sorted` (`C413`)
([#​15825](https://redirect.github.com/astral-sh/ruff/pull/15825 ))
- \[`pyupgrade`] Handle end-of-line comments for `quoted-annotation`
(`UP037`)
([#​15824](https://redirect.github.com/astral-sh/ruff/pull/15824 ))
##### Documentation
- Add missing config docstrings
([#​15803](https://redirect.github.com/astral-sh/ruff/pull/15803 ))
- Add references to `trio.run_process` and `anyio.run_process`
([#​15761](https://redirect.github.com/astral-sh/ruff/pull/15761 ))
- Use `uv init --lib` in tutorial
([#​15718](https://redirect.github.com/astral-sh/ruff/pull/15718 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNDUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-03 00:31:02 +00:00
Dhruv Manilawala
4df0796d61
Remove non-existing `lint.extendIgnore` editor setting ( #15844 )
...
This setting doesn't exist in the first place. I must've added it by
mistake thinking that it exists similar to `extendSelect`. One reason to
have auto-generated docs.
988be01fbe/crates/ruff_server/src/session/settings.rs (L124-L133)
Closes : #14665
2025-01-31 06:00:17 +00:00
Dylan
854ab03078
Bump version to 0.9.4 ( #15831 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-01-30 11:29:22 -06:00
renovate[bot]
0ff71bc3f3
Update dependency ruff to v0.9.3 ( #15755 )
2025-01-26 22:25:55 -05:00
renovate[bot]
43fbbdc71b
Update dependency mdformat-mkdocs to v4.1.2 ( #15754 )
2025-01-26 22:25:49 -05:00
Charlie Marsh
ab2e1905c4
Use `uv init --lib` in tutorial ( #15718 )
...
## Summary
Closes https://github.com/astral-sh/uv/issues/10933 .
2025-01-24 14:53:20 +00:00
Dylan
b5ffb404de
Bump version to 0.9.3 ( #15698 )
2025-01-23 12:43:56 -06:00
renovate[bot]
57a84a3354
Update dependency ruff to v0.9.2 ( #15595 )
2025-01-19 22:31:26 -05:00
Dhruv Manilawala
c20255abe4
Bump version to 0.9.2 ( #15529 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-01-16 13:07:26 +00:00
renovate[bot]
c0259e7bf2
Update dependency ruff to v0.9.1 ( #15432 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-01-11 17:18:38 +00:00
Micha Reiser
12f86f39a4
Ruff 0.9.1 ( #15407 )
2025-01-10 19:45:06 +01:00
Calum Young
adca7bd95c
Remove pygments pin ( #15404 )
...
## Summary
The recent release of Pygments
([2.19.1](https://github.com/pygments/pygments/releases/tag/2.19.1 ))
allows the pinned version to be removed as the PYI alias for Python
syntax highlighting has been removed.
## Test Plan
- Follow the steps outlined in
https://github.com/astral-sh/ruff/blob/main/CONTRIBUTING.md#mkdocs to
get the documentation site running locally.
- Spot test rules pages that have PYI code blocks to ensure that syntax
highlighting remains e.g.
[http://127.0.0.1:8000/ruff/rules/complex-if-statement-in-stub/ ](http://127.0.0.1:8000/ruff/rules/complex-if-statement-in-stub/ ).
**Note:** I am unable to test the insiders build but would assume that
it functions locally as I do not have access to MkDocs Insiders, but I
would like to assume that it functions in the same way as the
non-insiders build.
2025-01-10 12:15:13 -05:00
Antoine Dechaume
73d424ee5e
Fix outdated doc for handling the default file types with the pre-commit hook ( #15401 )
...
Co-authored-by: Antoine DECHAUME <>
2025-01-10 15:49:23 +01:00
Dhruv Manilawala
b861551b6a
Remove unnecessary backticks ( #15393 )
...
Ref: https://github.com/astral-sh/ruff/pull/15367#discussion_r1909448140
2025-01-10 09:22:26 +00:00
Micha Reiser
d0b2bbd55e
Release 0.9.0 ( #15371 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-01-09 14:53:08 +01:00
Dhruv Manilawala
f706c3fdf2
Add f-string formatting to the docs ( #15367 )
...
Revive https://github.com/astral-sh/ruff/pull/15341 as it got removed
from the latest rebase in https://github.com/astral-sh/ruff/pull/15238 .
2025-01-09 10:20:06 +01:00
Micha Reiser
943d4fc160
Update formatter preview documentation ( #15349 )
2025-01-09 10:20:06 +01:00
Micha Reiser
7821206b7b
Update Black deviations to reflect 2025 style changes ( #15127 )
2025-01-09 10:20:06 +01:00
Micha Reiser
b76d05e283
Remove formatter incompatibility warning for ISC001 ( #15123 )
2025-01-09 10:20:06 +01:00
Dhruv Manilawala
1447553bc2
Improve logging system using `logLevel`, avoid trace value ( #15232 )
...
## Summary
Refer to the VS Code PR
(https://github.com/astral-sh/ruff-vscode/pull/659 ) for details on the
change.
This PR changes the following:
1. Add tracing span for both request (request id and method name) and
notification (method name) handler
2. Remove the `RUFF_TRACE` environment variable. This was being used to
turn on / off logging for the server
3. Similarly, remove reading the `trace` value from the initialization
options
4. Remove handling the `$/setTrace` notification
5. Remove the specialized `TraceLogWriter` used for Zed and VS Code
(https://github.com/astral-sh/ruff/pull/12564 )
Regarding the (5) for the Zed editor, the reason that was implemented
was because there was no way of looking at the stderr messages in the
editor which has been changed. Now, it captures the stderr as part of
the "Server Logs".
(82492d74a8/crates/language_tools/src/lsp_log.rs (L548-L552) )
### Question
Regarding (1), I think having just a simple trace level message should
be good for now as the spans are not hierarchical. This could be tackled
with #12744 . The difference between the two:
<details><summary>Using <code>tracing::trace</code></summary>
<p>
```
0.019243416s DEBUG ThreadId(08) ruff_server::session::index::ruff_settings: Ignored path via `exclude`: /Users/dhruv/playground/ruff/.vscode
0.026398750s INFO main ruff_server::session::index: Registering workspace: /Users/dhruv/playground/ruff
0.026802125s TRACE ruff:main ruff_server::server::api: Received notification "textDocument/didOpen"
0.026930666s TRACE ruff:main ruff_server::server::api: Received notification "textDocument/didOpen"
0.026962333s TRACE ruff:main ruff_server::server::api: Received request "textDocument/diagnostic" (1)
0.027042875s TRACE ruff:main ruff_server::server::api: Received request "textDocument/diagnostic" (2)
0.027097500s TRACE ruff:main ruff_server::server::api: Received request "textDocument/codeAction" (3)
0.027107458s DEBUG ruff:worker:0 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
0.027123541s DEBUG ruff:worker:3 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/organize_imports.py
0.027514875s INFO ruff:main ruff_server::server: Configuration file watcher successfully registered
0.285689833s TRACE ruff:main ruff_server::server::api: Received request "textDocument/codeAction" (4)
45.741101666s TRACE ruff:main ruff_server::server::api: Received notification "textDocument/didClose"
47.108745500s TRACE ruff:main ruff_server::server::api: Received notification "textDocument/didOpen"
47.109802041s TRACE ruff:main ruff_server::server::api: Received request "textDocument/diagnostic" (5)
47.109926958s TRACE ruff:main ruff_server::server::api: Received request "textDocument/codeAction" (6)
47.110027791s DEBUG ruff:worker:6 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
51.863679125s TRACE ruff:main ruff_server::server::api: Received request "textDocument/hover" (7)
```
</p>
</details>
<details><summary>Using <code>tracing::trace_span</code></summary>
<p>
Only logging the enter event:
```
0.018638750s DEBUG ThreadId(11) ruff_server::session::index::ruff_settings: Ignored path via `exclude`: /Users/dhruv/playground/ruff/.vscode
0.025895791s INFO main ruff_server::session::index: Registering workspace: /Users/dhruv/playground/ruff
0.026378791s TRACE ruff:main notification{method="textDocument/didOpen"}: ruff_server::server::api: enter
0.026531208s TRACE ruff:main notification{method="textDocument/didOpen"}: ruff_server::server::api: enter
0.026567583s TRACE ruff:main request{id=1 method="textDocument/diagnostic"}: ruff_server::server::api: enter
0.026652541s TRACE ruff:main request{id=2 method="textDocument/diagnostic"}: ruff_server::server::api: enter
0.026711041s DEBUG ruff:worker:2 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/organize_imports.py
0.026729166s DEBUG ruff:worker:1 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
0.027023083s INFO ruff:main ruff_server::server: Configuration file watcher successfully registered
5.197554750s TRACE ruff:main notification{method="textDocument/didClose"}: ruff_server::server::api: enter
6.534458000s TRACE ruff:main notification{method="textDocument/didOpen"}: ruff_server::server::api: enter
6.535027958s TRACE ruff:main request{id=3 method="textDocument/diagnostic"}: ruff_server::server::api: enter
6.535271166s DEBUG ruff:worker:3 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/organize_imports.py
6.544240583s TRACE ruff:main request{id=4 method="textDocument/codeAction"}: ruff_server::server::api: enter
7.049692458s TRACE ruff:main request{id=5 method="textDocument/codeAction"}: ruff_server::server::api: enter
7.508142541s TRACE ruff:main request{id=6 method="textDocument/hover"}: ruff_server::server::api: enter
7.872421958s TRACE ruff:main request{id=7 method="textDocument/hover"}: ruff_server::server::api: enter
8.024498583s TRACE ruff:main request{id=8 method="textDocument/codeAction"}: ruff_server::server::api: enter
13.895063666s TRACE ruff:main request{id=9 method="textDocument/codeAction"}: ruff_server::server::api: enter
14.774706083s TRACE ruff:main request{id=10 method="textDocument/hover"}: ruff_server::server::api: enter
16.058918958s TRACE ruff:main notification{method="textDocument/didChange"}: ruff_server::server::api: enter
16.060562208s TRACE ruff:main request{id=11 method="textDocument/diagnostic"}: ruff_server::server::api: enter
16.061109083s DEBUG ruff:worker:8 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
21.561742875s TRACE ruff:main notification{method="textDocument/didChange"}: ruff_server::server::api: enter
21.563573791s TRACE ruff:main request{id=12 method="textDocument/diagnostic"}: ruff_server::server::api: enter
21.564206750s DEBUG ruff:worker:4 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
21.826691375s TRACE ruff:main request{id=13 method="textDocument/codeAction"}: ruff_server::server::api: enter
22.091080125s TRACE ruff:main request{id=14 method="textDocument/codeAction"}: ruff_server::server::api: enter
```
</p>
</details>
**Todo**
- [x] Update documentation (I'll be adding a troubleshooting section
under "Editors" as a follow-up which is for all editors)
- [x] Check for backwards compatibility. I don't think this should break
backwards compatibility as it's mainly targeted towards improving the
debugging experience.
~**Before I go on to updating the documentation, I'd appreciate initial
review on the chosen approach.**~
resolves : #14959
## Test Plan
Refer to the test plan in
https://github.com/astral-sh/ruff-vscode/pull/659 .
Example logs at `debug` level:
```
0.010770083s DEBUG ThreadId(15) ruff_server::session::index::ruff_settings: Ignored path via `exclude`: /Users/dhruv/playground/ruff/.vscode
0.018101916s INFO main ruff_server::session::index: Registering workspace: /Users/dhruv/playground/ruff
0.018559916s DEBUG ruff:worker:4 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
0.018992375s INFO ruff:main ruff_server::server: Configuration file watcher successfully registered
23.408802375s DEBUG ruff:worker:11 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
24.329127416s DEBUG ruff:worker:6 ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
```
Example logs at `trace` level:
```
0.010296375s DEBUG ThreadId(13) ruff_server::session::index::ruff_settings: Ignored path via `exclude`: /Users/dhruv/playground/ruff/.vscode
0.017422583s INFO main ruff_server::session::index: Registering workspace: /Users/dhruv/playground/ruff
0.018034458s TRACE ruff:main notification{method="textDocument/didOpen"}: ruff_server::server::api: enter
0.018199708s TRACE ruff:worker:0 request{id=1 method="textDocument/diagnostic"}: ruff_server::server::api: enter
0.018251167s DEBUG ruff:worker:0 request{id=1 method="textDocument/diagnostic"}: ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
0.018528708s INFO ruff:main ruff_server::server: Configuration file watcher successfully registered
1.611798417s TRACE ruff:worker:1 request{id=2 method="textDocument/codeAction"}: ruff_server::server::api: enter
1.861757542s TRACE ruff:worker:4 request{id=3 method="textDocument/codeAction"}: ruff_server::server::api: enter
7.027361792s TRACE ruff:worker:2 request{id=4 method="textDocument/codeAction"}: ruff_server::server::api: enter
7.851361500s TRACE ruff:worker:5 request{id=5 method="textDocument/codeAction"}: ruff_server::server::api: enter
7.901690875s TRACE ruff:main notification{method="textDocument/didChange"}: ruff_server::server::api: enter
7.903063167s TRACE ruff:worker:10 request{id=6 method="textDocument/diagnostic"}: ruff_server::server::api: enter
7.903183500s DEBUG ruff:worker:10 request{id=6 method="textDocument/diagnostic"}: ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
8.702385292s TRACE ruff:main notification{method="textDocument/didChange"}: ruff_server::server::api: enter
8.704106625s TRACE ruff:worker:3 request{id=7 method="textDocument/diagnostic"}: ruff_server::server::api: enter
8.704304875s DEBUG ruff:worker:3 request{id=7 method="textDocument/diagnostic"}: ruff_server::resolve: Included path via `include`: /Users/dhruv/playground/ruff/lsp/play.py
8.966853458s TRACE ruff:worker:9 request{id=8 method="textDocument/codeAction"}: ruff_server::server::api: enter
9.229622792s TRACE ruff:worker:6 request{id=9 method="textDocument/codeAction"}: ruff_server::server::api: enter
10.513111583s TRACE ruff:worker:7 request{id=10 method="textDocument/codeAction"}: ruff_server::server::api: enter
```
2025-01-08 18:18:00 +05:30
Charlie Marsh
5567e7c26b
Use uv consistently throughout the documentation ( #15302 )
...
## Summary
Closes
https://github.com/astral-sh/ruff/issues/15301#issuecomment-2573350821 .
2025-01-07 14:43:25 +00:00
renovate[bot]
84e13cea14
Update dependency ruff to v0.8.6 ( #15283 )
2025-01-05 20:05:36 -05:00
Micha Reiser
6b907c1305
Ruff 0.8.6 ( #15253 )
2025-01-04 13:09:26 +01:00
Dhruv Manilawala
11e873eb45
Bump version to 0.8.5 ( #15219 )
2025-01-02 17:21:21 +05:30
Christian Clauss
7ca3f9515c
Update references to `astral-sh/ruff-action` from v2 to `v3` ( #15212 )
2024-12-31 16:43:17 +01:00
renovate[bot]
e953ecf42f
Update dependency mdformat-mkdocs to v4.1.1 ( #15192 )
2024-12-29 21:29:33 -05:00
Enoch Kan
5bc9d6d3aa
Rename rules currently not conforming to naming convention ( #15102 )
...
## Summary
This pull request renames 19 rules which currently do not conform to
Ruff's [naming
convention](https://github.com/astral-sh/ruff/blob/main/CONTRIBUTING.md#rule-naming-convention ).
## Description
Fixes astral-sh/ruff#15009 .
2024-12-23 15:48:45 -06:00
renovate[bot]
da8acabc55
Update dependency mdformat to v0.7.21 ( #15113 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mdformat](https://redirect.github.com/hukkin/mdformat )
([changelog](https://mdformat.readthedocs.io/en/stable/users/changelog.html ))
| `==0.7.19` -> `==0.7.21` |
[](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>hukkin/mdformat (mdformat)</summary>
###
[`v0.7.21`](https://redirect.github.com/hukkin/mdformat/compare/0.7.20...0.7.21 )
[Compare
Source](https://redirect.github.com/hukkin/mdformat/compare/0.7.20...0.7.21 )
###
[`v0.7.20`](https://redirect.github.com/hukkin/mdformat/compare/0.7.19...0.7.20 )
[Compare
Source](https://redirect.github.com/hukkin/mdformat/compare/0.7.19...0.7.20 )
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS44MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 10:14:06 +05:30
renovate[bot]
fd2b8deddd
Update dependency ruff to v0.8.4 ( #15114 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff )
([source](https://redirect.github.com/astral-sh/ruff ),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md ))
| `==0.8.3` -> `==0.8.4` |
[](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>astral-sh/ruff (ruff)</summary>
###
[`v0.8.4`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#084 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.8.3...0.8.4 )
##### Preview features
- \[`airflow`] Extend `AIR302` with additional functions and classes
([#​15015](https://redirect.github.com/astral-sh/ruff/pull/15015 ))
- \[`airflow`] Implement `moved-to-provider-in-3` for modules that has
been moved to Airflow providers (`AIR303`)
([#​14764](https://redirect.github.com/astral-sh/ruff/pull/14764 ))
- \[`flake8-use-pathlib`] Extend check for invalid path suffix to
include the case `"."` (`PTH210`)
([#​14902](https://redirect.github.com/astral-sh/ruff/pull/14902 ))
- \[`perflint`] Fix panic in `PERF401` when list variable is after the
`for` loop
([#​14971](https://redirect.github.com/astral-sh/ruff/pull/14971 ))
- \[`perflint`] Simplify finding the loop target in `PERF401`
([#​15025](https://redirect.github.com/astral-sh/ruff/pull/15025 ))
- \[`pylint`] Preserve original value format (`PLR6104`)
([#​14978](https://redirect.github.com/astral-sh/ruff/pull/14978 ))
- \[`ruff`] Avoid false positives for `RUF027` for typing context
bindings
([#​15037](https://redirect.github.com/astral-sh/ruff/pull/15037 ))
- \[`ruff`] Check for ambiguous pattern passed to `pytest.raises()`
(`RUF043`)
([#​14966](https://redirect.github.com/astral-sh/ruff/pull/14966 ))
##### Rule changes
- \[`flake8-bandit`] Check `S105` for annotated assignment
([#​15059](https://redirect.github.com/astral-sh/ruff/pull/15059 ))
- \[`flake8-pyi`] More autofixes for `redundant-none-literal` (`PYI061`)
([#​14872](https://redirect.github.com/astral-sh/ruff/pull/14872 ))
- \[`pydocstyle`] Skip leading whitespace for `D403`
([#​14963](https://redirect.github.com/astral-sh/ruff/pull/14963 ))
- \[`ruff`] Skip `SQLModel` base classes for `mutable-class-default`
(`RUF012`)
([#​14949](https://redirect.github.com/astral-sh/ruff/pull/14949 ))
##### Bug
- \[`perflint`] Parenthesize walrus expressions in autofix for
`manual-list-comprehension` (`PERF401`)
([#​15050](https://redirect.github.com/astral-sh/ruff/pull/15050 ))
##### Server
- Check diagnostic refresh support from client capability which enables
dynamic configuration for various editors
([#​15014](https://redirect.github.com/astral-sh/ruff/pull/15014 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS44MC4wIiwidXBkYXRlZEluVmVyIjoiMzkuODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 10:12:07 +05:30
Dhruv Manilawala
3bb0dac235
Bump version to 0.8.4 ( #15064 )
2024-12-19 13:15:42 +00:00
renovate[bot]
50739f91dc
Update dependency mdformat-mkdocs to v4 ( #15011 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[mdformat-mkdocs](https://redirect.github.com/kyleking/mdformat-mkdocs )
([changelog](https://redirect.github.com/kyleking/mdformat-mkdocs/releases ))
| `==3.1.1` -> `==4.0.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>kyleking/mdformat-mkdocs (mdformat-mkdocs)</summary>
###
[`v4.0.0`](https://redirect.github.com/KyleKing/mdformat-mkdocs/releases/tag/v4.0.0 )
[Compare
Source](https://redirect.github.com/kyleking/mdformat-mkdocs/compare/v3.1.1...v4.0.0 )
#### What's Changed
- fix!: add newline after title for consistency with MKDocs style by
[@​KyleKing](https://redirect.github.com/KyleKing ) in
[https://github.com/KyleKing/mdformat-mkdocs/pull/44 ](https://redirect.github.com/KyleKing/mdformat-mkdocs/pull/44 )
**Full Changelog**:
https://github.com/KyleKing/mdformat-mkdocs/compare/v3.1.1...v4.0.0
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS41OC4xIiwidXBkYXRlZEluVmVyIjoiMzkuNTguMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: Kyle King <KyleKing@users.noreply.github.com>
2024-12-16 22:48:37 +05:30
renovate[bot]
a93bc2af6b
Update dependency ruff to v0.8.3 ( #15007 )
2024-12-15 20:25:04 -05:00
Dylan
37f433814c
Bump version to 0.8.3 ( #14937 )
...
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2024-12-12 14:13:06 +00:00
Peter Tripp
5509a3d7ae
Add LSP settings example for Zed editor ( #14894 )
...
## Summary
Add Zed settings examples to in addition to NeoVim and VSCode.
<img width="373" alt="Screenshot 2024-12-11 at 9 54 57"
src="https://github.com/user-attachments/assets/2f00cd8b-b23e-4ecb-8a0d-732ec275ee6b "
/>
## Test Plan
[*] Tested locally. No errors. Looks fine to me.
2024-12-12 12:44:56 +05:30
Dimitri Papadopoulos Orfanos
68eb0a2511
Stop referring to early ruff versions ( #14862 )
...
## Summary
Referring to old versions has become more distracting than useful.
## Test Plan
—
2024-12-09 16:47:26 +01:00
InSync
8df4983057
Promote uv in installation guides ( #14056 )
...
> [Because this is an Astral repository
;)](https://github.com/astral-sh/packse/pull/183 )
[Originally
reported](https://discord.com/channels/1039017663004942429/1039017663512449056/1302319421204729906 )
by clearfram3 on Discord.
`grep`ping for `pip install` in `.md` files reveals a few other places
where the same fix might be applicable.
---------
Co-authored-by: Micha Reiser <micha@reiser.io>
2024-12-09 08:25:18 +00:00
renovate[bot]
745a4b425e
Update dependency ruff to v0.8.2 ( #14851 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff )
([source](https://redirect.github.com/astral-sh/ruff ),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md ))
| `==0.8.1` -> `==0.8.2` |
[](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>astral-sh/ruff (ruff)</summary>
###
[`v0.8.2`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#082 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.8.1...0.8.2 )
##### Preview features
- \[`airflow`] Avoid deprecated values (`AIR302`)
([#​14582](https://redirect.github.com/astral-sh/ruff/pull/14582 ))
- \[`airflow`] Extend removed names for `AIR302`
([#​14734](https://redirect.github.com/astral-sh/ruff/pull/14734 ))
- \[`ruff`] Extend `unnecessary-regular-expression` to non-literal
strings (`RUF055`)
([#​14679](https://redirect.github.com/astral-sh/ruff/pull/14679 ))
- \[`ruff`] Implement `used-dummy-variable` (`RUF052`)
([#​14611](https://redirect.github.com/astral-sh/ruff/pull/14611 ))
- \[`ruff`] Implement `unnecessary-cast-to-int` (`RUF046`)
([#​14697](https://redirect.github.com/astral-sh/ruff/pull/14697 ))
##### Rule changes
- \[`airflow`] Check `AIR001` from builtin or providers `operators`
module
([#​14631](https://redirect.github.com/astral-sh/ruff/pull/14631 ))
- \[`flake8-pytest-style`] Remove `@` in `pytest.mark.parametrize` rule
messages
([#​14770](https://redirect.github.com/astral-sh/ruff/pull/14770 ))
- \[`pandas-vet`] Skip rules if the `panda` module hasn't been seen
([#​14671](https://redirect.github.com/astral-sh/ruff/pull/14671 ))
- \[`pylint`] Fix false negatives for `ascii` and `sorted` in
`len-as-condition` (`PLC1802`)
([#​14692](https://redirect.github.com/astral-sh/ruff/pull/14692 ))
- \[`refurb`] Guard `hashlib` imports and mark `hashlib-digest-hex` fix
as safe (`FURB181`)
([#​14694](https://redirect.github.com/astral-sh/ruff/pull/14694 ))
##### Configuration
- \[`flake8-import-conventions`] Improve syntax check for aliases
supplied in configuration for `unconventional-import-alias` (`ICN001`)
([#​14745](https://redirect.github.com/astral-sh/ruff/pull/14745 ))
##### Bug fixes
- Revert: \[pyflakes] Avoid false positives in `@no_type_check` contexts
(`F821`, `F722`)
([#​14615](https://redirect.github.com/astral-sh/ruff/issues/14615 ))
([#​14726](https://redirect.github.com/astral-sh/ruff/pull/14726 ))
- \[`pep8-naming`] Avoid false positive for `class Bar(type(foo))`
(`N804`)
([#​14683](https://redirect.github.com/astral-sh/ruff/pull/14683 ))
- \[`pycodestyle`] Handle f-strings properly for
`invalid-escape-sequence` (`W605`)
([#​14748](https://redirect.github.com/astral-sh/ruff/pull/14748 ))
- \[`pylint`] Ignore `@overload` in `PLR0904`
([#​14730](https://redirect.github.com/astral-sh/ruff/pull/14730 ))
- \[`refurb`] Handle non-finite decimals in
`verbose-decimal-constructor` (`FURB157`)
([#​14596](https://redirect.github.com/astral-sh/ruff/pull/14596 ))
- \[`ruff`] Avoid emitting `assignment-in-assert` when all references to
the assigned variable are themselves inside `assert`s (`RUF018`)
([#​14661](https://redirect.github.com/astral-sh/ruff/pull/14661 ))
##### Documentation
- Improve docs for `flake8-use-pathlib` rules
([#​14741](https://redirect.github.com/astral-sh/ruff/pull/14741 ))
- Improve error messages and docs for `flake8-comprehensions` rules
([#​14729](https://redirect.github.com/astral-sh/ruff/pull/14729 ))
- \[`flake8-type-checking`] Expands `TC006` docs to better explain
itself
([#​14749](https://redirect.github.com/astral-sh/ruff/pull/14749 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS40Mi40IiwidXBkYXRlZEluVmVyIjoiMzkuNDIuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 00:46:20 +00:00
Christian Clauss
5aab57b3e9
docs/integrations.md: Upgrade example to astral-sh/ruff-action@v2 ( #14800 )
...
<!--
Thank you for contributing to Ruff! To help us out with reviewing,
please consider the following:
- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->
## Summary
https://docs.astral.sh/ruff/integrations/#github-actions upgraded for
https://github.com/astral-sh/ruff-action/releases
<!-- What's the purpose of the change? What does it do, and why? -->
## Test Plan
<!-- How was it tested? -->
@eifinger Your review, please.
2024-12-05 21:47:03 -05:00
Dhruv Manilawala
b0e26e6fc8
Bump version to 0.8.2 ( #14789 )
2024-12-05 18:06:35 +05:30
renovate[bot]
5a67d3269b
Update pre-commit dependencies ( #14719 )
2024-12-02 06:02:56 +00:00
renovate[bot]
0c5f03a059
Update dependency ruff to v0.8.1 ( #14717 )
2024-12-02 01:13:13 +00:00
Dhruv Manilawala
976c37a849
Bump version to 0.8.1 ( #14655 )
2024-11-28 19:12:50 +05:30
Simon Brugman
8a860b89b4
Add social icons to the footer ( #14591 )
...
## Summary
Add social icons to the footer
`mkdocs-material` update is required for the `x-twitter` icon.
## Test Plan
Tested locally.
---------
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2024-11-27 11:07:45 +00:00
renovate[bot]
d178d115f3
Update dependency mdformat to v0.7.19 ( #14576 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-25 08:40:53 +01:00
Micha Reiser
8358ad8d25
Ruff 0.8 release ( #14486 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: David Salvisberg <dave@daverball.com>
2024-11-22 08:45:19 +01:00
yataka
1b180c8342
Change default for Python version from 3.8 to 3.9 ( #13896 )
...
Co-authored-by: Micha Reiser <micha@reiser.io>
2024-11-20 13:11:51 +01:00
renovate[bot]
157b49a8ee
Update dependency ruff to v0.7.4 ( #14415 )
2024-11-17 20:41:40 -05:00
Dhruv Manilawala
ed7b98cf9b
Bump version to 0.7.4 ( #14358 )
2024-11-15 11:17:32 +00:00
Pierre GIRAUD
ec2c7cad0e
Improve docs for ALE plugin for vim ( #14335 )
...
2 different fixers are available in ALE :
- ruff which runs `ruff check --fix` command (useful for example when
isort is enabled in lint config),
- ruff_format which runs `run format` command.
The documentation was missing `ruff` as a possible fixer in ALE.
---------
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2024-11-14 13:01:34 +00:00
Charlie Marsh
95c8f5fd0f
Document comment policy around fix safety ( #14300 )
...
## Summary
Closes https://github.com/astral-sh/ruff/issues/9790 .
2024-11-13 08:03:58 -05:00
renovate[bot]
1c586b29e2
Update dependency mkdocs-redirects to v1.2.2 ( #14252 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 10:11:22 +00:00
renovate[bot]
1cf4d2ff69
Update dependency ruff to v0.7.3 ( #14253 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://docs.astral.sh/ruff )
([source](https://redirect.github.com/astral-sh/ruff ),
[changelog](https://redirect.github.com/astral-sh/ruff/blob/main/CHANGELOG.md ))
| `==0.7.2` -> `==0.7.3` |
[](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>astral-sh/ruff (ruff)</summary>
###
[`v0.7.3`](https://redirect.github.com/astral-sh/ruff/blob/HEAD/CHANGELOG.md#073 )
[Compare
Source](https://redirect.github.com/astral-sh/ruff/compare/0.7.2...0.7.3 )
##### Preview features
- Formatter: Disallow single-line implicit concatenated strings
([#​13928](https://redirect.github.com/astral-sh/ruff/pull/13928 ))
- \[`flake8-pyi`] Include all Python file types for `PYI006` and
`PYI066`
([#​14059](https://redirect.github.com/astral-sh/ruff/pull/14059 ))
- \[`flake8-simplify`] Implement `split-of-static-string` (`SIM905`)
([#​14008](https://redirect.github.com/astral-sh/ruff/pull/14008 ))
- \[`refurb`] Implement `subclass-builtin` (`FURB189`)
([#​14105](https://redirect.github.com/astral-sh/ruff/pull/14105 ))
- \[`ruff`] Improve diagnostic messages and docs (`RUF031`, `RUF032`,
`RUF034`)
([#​14068](https://redirect.github.com/astral-sh/ruff/pull/14068 ))
##### Rule changes
- Detect items that hash to same value in duplicate sets (`B033`,
`PLC0208`)
([#​14064](https://redirect.github.com/astral-sh/ruff/pull/14064 ))
- \[`eradicate`] Better detection of IntelliJ language injection
comments (`ERA001`)
([#​14094](https://redirect.github.com/astral-sh/ruff/pull/14094 ))
- \[`flake8-pyi`] Add autofix for `docstring-in-stub` (`PYI021`)
([#​14150](https://redirect.github.com/astral-sh/ruff/pull/14150 ))
- \[`flake8-pyi`] Update `duplicate-literal-member` (`PYI062`) to alawys
provide an autofix
([#​14188](https://redirect.github.com/astral-sh/ruff/pull/14188 ))
- \[`pyflakes`] Detect items that hash to same value in duplicate
dictionaries (`F601`)
([#​14065](https://redirect.github.com/astral-sh/ruff/pull/14065 ))
- \[`ruff`] Fix false positive for decorators (`RUF028`)
([#​14061](https://redirect.github.com/astral-sh/ruff/pull/14061 ))
##### Bug fixes
- Avoid parsing joint rule codes as distinct codes in `# noqa`
([#​12809](https://redirect.github.com/astral-sh/ruff/pull/12809 ))
- \[`eradicate`] ignore `# language=` in commented-out-code rule
(ERA001)
([#​14069](https://redirect.github.com/astral-sh/ruff/pull/14069 ))
- \[`flake8-bugbear`] - do not run `mutable-argument-default` on stubs
(`B006`)
([#​14058](https://redirect.github.com/astral-sh/ruff/pull/14058 ))
- \[`flake8-builtins`] Skip lambda expressions in
`builtin-argument-shadowing (A002)`
([#​14144](https://redirect.github.com/astral-sh/ruff/pull/14144 ))
- \[`flake8-comprehension`] Also remove trailing comma while fixing
`C409` and `C419`
([#​14097](https://redirect.github.com/astral-sh/ruff/pull/14097 ))
- \[`flake8-simplify`] Allow `open` without context manager in `return`
statement (`SIM115`)
([#​14066](https://redirect.github.com/astral-sh/ruff/pull/14066 ))
- \[`pylint`] Respect hash-equivalent literals in `iteration-over-set`
(`PLC0208`)
([#​14063](https://redirect.github.com/astral-sh/ruff/pull/14063 ))
- \[`pylint`] Update known dunder methods for Python 3.13 (`PLW3201`)
([#​14146](https://redirect.github.com/astral-sh/ruff/pull/14146 ))
- \[`pyupgrade`] - ignore kwarg unpacking for `UP044`
([#​14053](https://redirect.github.com/astral-sh/ruff/pull/14053 ))
- \[`refurb`] Parse more exotic decimal strings in
`verbose-decimal-constructor` (`FURB157`)
([#​14098](https://redirect.github.com/astral-sh/ruff/pull/14098 ))
##### Documentation
- Add links to missing related options within rule documentations
([#​13971](https://redirect.github.com/astral-sh/ruff/pull/13971 ))
- Add rule short code to mkdocs tags to allow searching via rule codes
([#​14040](https://redirect.github.com/astral-sh/ruff/pull/14040 ))
</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:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImludGVybmFsIl19-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 08:17:22 +00:00
Dhruv Manilawala
fbf140a665
Bump version to 0.7.3 ( #14197 )
2024-11-08 16:39:37 +05:30
renovate[bot]
fb0881d836
Update dependency mdformat-mkdocs to v3.1.1 ( #14081 )
...
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[mdformat-mkdocs](https://redirect.github.com/kyleking/mdformat-mkdocs )
([changelog](https://redirect.github.com/kyleking/mdformat-mkdocs/releases ))
| `==3.0.1` -> `==3.1.1` |
[](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>kyleking/mdformat-mkdocs (mdformat-mkdocs)</summary>
###
[`v3.1.1`](https://redirect.github.com/KyleKing/mdformat-mkdocs/releases/tag/v3.1.1 )
[Compare
Source](https://redirect.github.com/kyleking/mdformat-mkdocs/compare/v3.1.0...v3.1.1 )
**Full Changelog**:
https://github.com/KyleKing/mdformat-mkdocs/compare/v3.1.0...v3.1.1
###
[`v3.1.0`](https://redirect.github.com/kyleking/mdformat-mkdocs/compare/v3.0.1...v3.1.0 )
[Compare
Source](https://redirect.github.com/kyleking/mdformat-mkdocs/compare/v3.0.1...v3.1.0 )
</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:eyJjcmVhdGVkSW5WZXIiOiIzOC4xNDIuNCIsInVwZGF0ZWRJblZlciI6IjM4LjE0Mi40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJpbnRlcm5hbCJdfQ==-->
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-04 08:37:53 +05:30
renovate[bot]
3133964d8c
Update dependency ruff to v0.7.2 ( #14077 )
2024-11-03 21:16:28 -05:00
Dhruv Manilawala
ef72fd79a7
Bump version to 0.7.2 ( #14039 )
2024-11-01 19:09:07 +05:30