Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isort: fix bad interaction between force-sort-within-sections and force-to-top #3645

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

bluetech
Copy link
Contributor

Fixes #3630.

To ease review I split to 2 commits - simple refactor + the logic change.

I've tested this on our code base, works well now.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2023

PR Check Results

Ecosystem

✅ ecosystem check detected no changes.

Benchmark

Linux

group                                      main                                   pr
-----                                      ----                                   --
linter/all-rules/large/dataset.py          1.00     15.5±0.16ms     2.6 MB/sec    1.01     15.6±0.23ms     2.6 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.01      4.1±0.04ms     4.0 MB/sec    1.00      4.1±0.05ms     4.0 MB/sec
linter/all-rules/numpy/globals.py          1.00    568.8±8.12µs     5.2 MB/sec    1.02    577.6±6.66µs     5.1 MB/sec
linter/all-rules/pydantic/types.py         1.00      6.8±0.08ms     3.7 MB/sec    1.01      6.9±0.07ms     3.7 MB/sec
linter/default-rules/large/dataset.py      1.01      8.4±0.06ms     4.9 MB/sec    1.00      8.3±0.08ms     4.9 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.02  1924.4±13.96µs     8.7 MB/sec    1.00  1894.1±21.54µs     8.8 MB/sec
linter/default-rules/numpy/globals.py      1.00    216.6±2.47µs    13.6 MB/sec    1.01    218.7±1.66µs    13.5 MB/sec
linter/default-rules/pydantic/types.py     1.00      4.0±0.03ms     6.4 MB/sec    1.00      4.0±0.04ms     6.4 MB/sec

Windows

group                                      main                                    pr
-----                                      ----                                    --
linter/all-rules/large/dataset.py          1.06     15.4±0.79ms     2.6 MB/sec     1.00     14.5±0.42ms     2.8 MB/sec
linter/all-rules/numpy/ctypeslib.py        1.04      4.2±0.21ms     4.0 MB/sec     1.00      4.0±0.22ms     4.1 MB/sec
linter/all-rules/numpy/globals.py          1.13   587.4±26.36µs     5.0 MB/sec     1.00   520.6±29.79µs     5.7 MB/sec
linter/all-rules/pydantic/types.py         1.12      7.2±0.32ms     3.5 MB/sec     1.00      6.4±0.23ms     4.0 MB/sec
linter/default-rules/large/dataset.py      1.12      9.5±0.56ms     4.3 MB/sec     1.00      8.4±0.29ms     4.8 MB/sec
linter/default-rules/numpy/ctypeslib.py    1.06  1894.8±155.65µs     8.8 MB/sec    1.00  1787.1±94.85µs     9.3 MB/sec
linter/default-rules/numpy/globals.py      1.00   193.4±10.95µs    15.3 MB/sec     1.13   218.1±11.40µs    13.5 MB/sec
linter/default-rules/pydantic/types.py     1.00      3.8±0.12ms     6.8 MB/sec     1.10      4.1±0.24ms     6.2 MB/sec

Comment on lines 49 to 54
match (force_to_top.contains(name1), force_to_top.contains(name2)) {
(true, true) => Ordering::Equal,
(false, false) => Ordering::Equal,
(true, false) => Ordering::Less,
(false, true) => Ordering::Greater,
}
Copy link
Contributor

@JonathanPlasse JonathanPlasse Mar 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can simply this to

Suggested change
match (force_to_top.contains(name1), force_to_top.contains(name2)) {
(true, true) => Ordering::Equal,
(false, false) => Ordering::Equal,
(true, false) => Ordering::Less,
(false, true) => Ordering::Greater,
}
force_to_top.contains(name2).cmp(&force_to_top.contains(name1))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to something similar, thanks.

@charliermarsh charliermarsh merged commit fe568c0 into astral-sh:main Mar 22, 2023
@charliermarsh charliermarsh added bug Something isn't working isort Related to import sorting labels Mar 22, 2023
renovate bot referenced this pull request in ixm-one/pytest-cmake-presets Mar 23, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://github.com/charliermarsh/ruff) | `^0.0.257` ->
`^0.0.258` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.258/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.258/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.258/compatibility-slim/0.0.257)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.258/confidence-slim/0.0.257)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.258`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.258)

[Compare
Source](https://github.com/charliermarsh/ruff/compare/v0.0.257...v0.0.258)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Rules

- \[`flake8-comprehensions`] Update `C416` with dict comprehension
(autofixable) by [@&#8203;dhruvmanila](https://github.com/dhruvmanila)
in
[https://github.com/charliermarsh/ruff/pull/3605](https://github.com/charliermarsh/ruff/pull/3605)
- \[`pylint`]: Implement `assert-on-string-literal` (`W0129`) by
[@&#8203;latonis](https://github.com/latonis) in
[https://github.com/charliermarsh/ruff/pull/3610](https://github.com/charliermarsh/ruff/pull/3610)
- \[`pyupgrade`] Convert single-argument %-style format calls by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3600](https://github.com/charliermarsh/ruff/pull/3600)
- \[`pyupgrade`] Flag PEP 585 and PEP 604 violations in quoted
annotations by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3593](https://github.com/charliermarsh/ruff/pull/3593)
- \[`pyupgrade`] Enable autofix for annotations within 'simple' string
literals by [@&#8203;charliermarsh](https://github.com/charliermarsh)
in
[https://github.com/charliermarsh/ruff/pull/3657](https://github.com/charliermarsh/ruff/pull/3657)
- \[`pyflakes`] Add autofix functionality for `F523`
([#&#8203;3613](https://github.com/charliermarsh/ruff/issues/3613)) by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3613](https://github.com/charliermarsh/ruff/pull/3613)
- \[`flake8-bandit`]: Implement deny-list rules for suspicious member
calls by [@&#8203;colin99d](https://github.com/colin99d) in
[https://github.com/charliermarsh/ruff/pull/3239](https://github.com/charliermarsh/ruff/pull/3239)
- \[`flake8-annotations`] Add autofix for `ANN204` with magic methods by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3633](https://github.com/charliermarsh/ruff/pull/3633)
- \[`pylint`] Implement `binary-op-exception` (`PLW0711`) by
[@&#8203;latonis](https://github.com/latonis) in
[https://github.com/charliermarsh/ruff/pull/3639](https://github.com/charliermarsh/ruff/pull/3639)
- \[`flake8-django`]: Implement rule DJ012 by
[@&#8203;dhruvmanila](https://github.com/dhruvmanila) in
[https://github.com/charliermarsh/ruff/pull/3659](https://github.com/charliermarsh/ruff/pull/3659)

##### Bug Fixes

- Check exclusions prior to resolving `pyproject.toml` files by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3588](https://github.com/charliermarsh/ruff/pull/3588)
- Fix D417 false positive by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3596](https://github.com/charliermarsh/ruff/pull/3596)
- Avoid removing comment hash for noqa's with trailing content by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3589](https://github.com/charliermarsh/ruff/pull/3589)
- Avoid panics for implicitly-concatenated docstrings by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3584](https://github.com/charliermarsh/ruff/pull/3584)
- Fix infinite loop due to rules `D207` & `W605` by
[@&#8203;vlindhol](https://github.com/vlindhol) in
[https://github.com/charliermarsh/ruff/pull/3609](https://github.com/charliermarsh/ruff/pull/3609)
- Avoid trimming escaped whitespace in D210 by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3635](https://github.com/charliermarsh/ruff/pull/3635)
- Handle `UP032` autofix with adjacent keywords by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3636](https://github.com/charliermarsh/ruff/pull/3636)
- Consider same-site fixes to be overlapping by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3638](https://github.com/charliermarsh/ruff/pull/3638)
- Avoid `RUF007` fixes for more than two arguments by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3654](https://github.com/charliermarsh/ruff/pull/3654)
- Allow `pairwise` diagnostics for `zip(..., strict=True)` by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3669](https://github.com/charliermarsh/ruff/pull/3669)
- isort: fix bad interaction between `force-sort-within-sections` and
`force-to-top` by [@&#8203;bluetech](https://github.com/bluetech) in
[https://github.com/charliermarsh/ruff/pull/3645](https://github.com/charliermarsh/ruff/pull/3645)
- Gracefully handle lint panics by
[@&#8203;MichaReiser](https://github.com/MichaReiser) in
[https://github.com/charliermarsh/ruff/pull/3509](https://github.com/charliermarsh/ruff/pull/3509)
- Fix TRY300 false positive by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3634](https://github.com/charliermarsh/ruff/pull/3634)
- Avoid raising PEP 604 errors with forward-referenced members by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3640](https://github.com/charliermarsh/ruff/pull/3640)
- Avoid attempting infinite `open` fix with re-bound builtin by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3650](https://github.com/charliermarsh/ruff/pull/3650)
- Check indentation level when executing E231 by
[@&#8203;kyoto7250](https://github.com/kyoto7250) in
[https://github.com/charliermarsh/ruff/pull/3668](https://github.com/charliermarsh/ruff/pull/3668)
- Flag, but don't fix, unused imports (`F401`) in `ModuleNotFoundError`
blocks by [@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3658](https://github.com/charliermarsh/ruff/pull/3658)

#### New Contributors

- [@&#8203;Rogdham](https://github.com/Rogdham) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/3607](https://github.com/charliermarsh/ruff/pull/3607)
- [@&#8203;vlindhol](https://github.com/vlindhol) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/3609](https://github.com/charliermarsh/ruff/pull/3609)
- [@&#8203;dhruvmanila](https://github.com/dhruvmanila) made their
first contribution in
[https://github.com/charliermarsh/ruff/pull/3605](https://github.com/charliermarsh/ruff/pull/3605)
- [@&#8203;luke396](https://github.com/luke396) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/3604](https://github.com/charliermarsh/ruff/pull/3604)
- [@&#8203;fuziontech](https://github.com/fuziontech) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/3641](https://github.com/charliermarsh/ruff/pull/3641)

**Full Changelog**:
astral-sh/ruff@v0.0.257...v0.0.258

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/ixm-one/pytest-cmake-presets).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNy4xIiwidXBkYXRlZEluVmVyIjoiMzUuMTcuMSJ9-->

Signed-off-by: Renovate Bot <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in allenporter/flux-local Mar 25, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [ruff](https://github.com/charliermarsh/ruff) | `==0.0.257` ->
`==0.0.259` |
[![age](https://badges.renovateapi.com/packages/pypi/ruff/0.0.259/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/pypi/ruff/0.0.259/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/pypi/ruff/0.0.259/compatibility-slim/0.0.257)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/pypi/ruff/0.0.259/confidence-slim/0.0.257)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>charliermarsh/ruff</summary>

###
[`v0.0.259`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.259)

[Compare
Source](https://github.com/charliermarsh/ruff/compare/v0.0.258...v0.0.259)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### Summary

Follow-up release to `v0.0.258` to fix an issue related to rule
resolution via `select` and `ignore`.

#### What's Changed

##### Bug Fixes

- Fix RuleSet.remove by
[@&#8203;MichaReiser](https://github.com/MichaReiser) in
[https://github.com/charliermarsh/ruff/pull/3685](https://github.com/charliermarsh/ruff/pull/3685)
- Respect all rule-exemption sources when suppressing parser errors by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3665](https://github.com/charliermarsh/ruff/pull/3665)
- Avoid nested loops in `missing_whitespace` by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3688](https://github.com/charliermarsh/ruff/pull/3688)

**Full Changelog**:
astral-sh/ruff@v0.0.258...v0.0.259

###
[`v0.0.258`](https://github.com/charliermarsh/ruff/releases/tag/v0.0.258)

[Compare
Source](https://github.com/charliermarsh/ruff/compare/v0.0.257...v0.0.258)

<!-- Release notes generated using configuration in .github/release.yml
at main -->

#### What's Changed

##### Rules

- \[`flake8-comprehensions`] Update `C416` with dict comprehension
(autofixable) by [@&#8203;dhruvmanila](https://github.com/dhruvmanila)
in
[https://github.com/charliermarsh/ruff/pull/3605](https://github.com/charliermarsh/ruff/pull/3605)
- \[`pylint`]: Implement `assert-on-string-literal` (`W0129`) by
[@&#8203;latonis](https://github.com/latonis) in
[https://github.com/charliermarsh/ruff/pull/3610](https://github.com/charliermarsh/ruff/pull/3610)
- \[`pyupgrade`] Convert single-argument %-style format calls by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3600](https://github.com/charliermarsh/ruff/pull/3600)
- \[`pyupgrade`] Flag PEP 585 and PEP 604 violations in quoted
annotations by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3593](https://github.com/charliermarsh/ruff/pull/3593)
- \[`pyupgrade`] Enable autofix for annotations within 'simple' string
literals by [@&#8203;charliermarsh](https://github.com/charliermarsh)
in
[https://github.com/charliermarsh/ruff/pull/3657](https://github.com/charliermarsh/ruff/pull/3657)
- \[`pyflakes`] Add autofix functionality for `F523`
([#&#8203;3613](https://github.com/charliermarsh/ruff/issues/3613)) by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3613](https://github.com/charliermarsh/ruff/pull/3613)
- \[`flake8-bandit`]: Implement deny-list rules for suspicious member
calls by [@&#8203;colin99d](https://github.com/colin99d) in
[https://github.com/charliermarsh/ruff/pull/3239](https://github.com/charliermarsh/ruff/pull/3239)
- \[`flake8-annotations`] Add autofix for `ANN204` with magic methods by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3633](https://github.com/charliermarsh/ruff/pull/3633)
- \[`pylint`] Implement `binary-op-exception` (`PLW0711`) by
[@&#8203;latonis](https://github.com/latonis) in
[https://github.com/charliermarsh/ruff/pull/3639](https://github.com/charliermarsh/ruff/pull/3639)
- \[`flake8-django`]: Implement rule DJ012 by
[@&#8203;dhruvmanila](https://github.com/dhruvmanila) in
[https://github.com/charliermarsh/ruff/pull/3659](https://github.com/charliermarsh/ruff/pull/3659)

##### Bug Fixes

- Check exclusions prior to resolving `pyproject.toml` files by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3588](https://github.com/charliermarsh/ruff/pull/3588)
- Fix D417 false positive by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3596](https://github.com/charliermarsh/ruff/pull/3596)
- Avoid removing comment hash for noqa's with trailing content by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3589](https://github.com/charliermarsh/ruff/pull/3589)
- Avoid panics for implicitly-concatenated docstrings by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3584](https://github.com/charliermarsh/ruff/pull/3584)
- Fix infinite loop due to rules `D207` & `W605` by
[@&#8203;vlindhol](https://github.com/vlindhol) in
[https://github.com/charliermarsh/ruff/pull/3609](https://github.com/charliermarsh/ruff/pull/3609)
- Avoid trimming escaped whitespace in D210 by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3635](https://github.com/charliermarsh/ruff/pull/3635)
- Handle `UP032` autofix with adjacent keywords by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3636](https://github.com/charliermarsh/ruff/pull/3636)
- Consider same-site fixes to be overlapping by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3638](https://github.com/charliermarsh/ruff/pull/3638)
- Avoid `RUF007` fixes for more than two arguments by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3654](https://github.com/charliermarsh/ruff/pull/3654)
- Allow `pairwise` diagnostics for `zip(..., strict=True)` by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3669](https://github.com/charliermarsh/ruff/pull/3669)
- isort: fix bad interaction between `force-sort-within-sections` and
`force-to-top` by [@&#8203;bluetech](https://github.com/bluetech) in
[https://github.com/charliermarsh/ruff/pull/3645](https://github.com/charliermarsh/ruff/pull/3645)
- Gracefully handle lint panics by
[@&#8203;MichaReiser](https://github.com/MichaReiser) in
[https://github.com/charliermarsh/ruff/pull/3509](https://github.com/charliermarsh/ruff/pull/3509)
- Fix TRY300 false positive by
[@&#8203;JonathanPlasse](https://github.com/JonathanPlasse) in
[https://github.com/charliermarsh/ruff/pull/3634](https://github.com/charliermarsh/ruff/pull/3634)
- Avoid raising PEP 604 errors with forward-referenced members by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3640](https://github.com/charliermarsh/ruff/pull/3640)
- Avoid attempting infinite `open` fix with re-bound builtin by
[@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3650](https://github.com/charliermarsh/ruff/pull/3650)
- Check indentation level when executing E231 by
[@&#8203;kyoto7250](https://github.com/kyoto7250) in
[https://github.com/charliermarsh/ruff/pull/3668](https://github.com/charliermarsh/ruff/pull/3668)
- Flag, but don't fix, unused imports (`F401`) in `ModuleNotFoundError`
blocks by [@&#8203;charliermarsh](https://github.com/charliermarsh) in
[https://github.com/charliermarsh/ruff/pull/3658](https://github.com/charliermarsh/ruff/pull/3658)

#### New Contributors

- [@&#8203;Rogdham](https://github.com/Rogdham) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/3607](https://github.com/charliermarsh/ruff/pull/3607)
- [@&#8203;vlindhol](https://github.com/vlindhol) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/3609](https://github.com/charliermarsh/ruff/pull/3609)
- [@&#8203;dhruvmanila](https://github.com/dhruvmanila) made their
first contribution in
[https://github.com/charliermarsh/ruff/pull/3605](https://github.com/charliermarsh/ruff/pull/3605)
- [@&#8203;luke396](https://github.com/luke396) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/3604](https://github.com/charliermarsh/ruff/pull/3604)
- [@&#8203;fuziontech](https://github.com/fuziontech) made their first
contribution in
[https://github.com/charliermarsh/ruff/pull/3641](https://github.com/charliermarsh/ruff/pull/3641)

**Full Changelog**:
astral-sh/ruff@v0.0.257...v0.0.258

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/allenporter/flux-local).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNC4yIiwidXBkYXRlZEluVmVyIjoiMzUuMTQuMiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working isort Related to import sorting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

isort: bad interaction between force-sort-within-sections and force-to-top
3 participants