Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0b1741d
test: add test cases for #6371
Alex-ley-scrub Feb 9, 2026
9c642c3
feat(isort): implement import_heading option
Alex-ley-scrub Feb 9, 2026
cb982e4
fix: clippy warnings
Alex-ley-scrub Feb 9, 2026
e9c5c31
fix: run cargo dev generate-all
Alex-ley-scrub Feb 9, 2026
6ffebbf
fix: update snapshots
Alex-ley-scrub Feb 9, 2026
9b0167c
fix: address PR comment https://github.com/astral-sh/ruff/pull/23151#…
Alex-ley-scrub Feb 9, 2026
fe12aa3
fix: address PR comment https://github.com/astral-sh/ruff/pull/23151#…
Alex-ley-scrub Feb 9, 2026
e05212c
fix: update test to better match the name of the test and update snap…
Alex-ley-scrub Feb 9, 2026
e433060
fix: address PR review comments https://github.com/astral-sh/ruff/pul…
Alex-ley-scrub Feb 10, 2026
de18481
fix: update (rever) snapshots after running tests outside of conda in…
Alex-ley-scrub Feb 10, 2026
b5140c9
fix: adopt PR suggestion
Alex-ley-scrub Feb 11, 2026
1e89052
fix: adopt PR suggestion
Alex-ley-scrub Feb 11, 2026
e18a752
fix: adopt PR suggestion
Alex-ley-scrub Feb 11, 2026
83400cc
fix: adopt PR suggestion
Alex-ley-scrub Feb 11, 2026
ca0f608
fix: adopt PR suggestion
Alex-ley-scrub Feb 11, 2026
9f79fb7
fix: adopt PR suggestion
Alex-ley-scrub Feb 11, 2026
ab3d745
fix: clippy/compiler warnings/errors
Alex-ley-scrub Feb 11, 2026
c35e536
fix: rename snapshots
Alex-ley-scrub Feb 11, 2026
9e52b33
fix: address some more PR feedback
Alex-ley-scrub Feb 11, 2026
1fb2633
fix: address some more PR feedback, and use better variable names again
Alex-ley-scrub Feb 11, 2026
90e2229
fix: minor comment formatting
Alex-ley-scrub Feb 11, 2026
5d4a504
fix: manually update ruff.schema.json because was missing the propert…
Alex-ley-scrub Feb 11, 2026
e3794e7
fix: add missing `schemars(extend("properties" ...))` to ensure prope…
Alex-ley-scrub Feb 11, 2026
3c1fbf0
fix: add test case to clarify isort vs ruff.isort behaviour with dupl…
Alex-ley-scrub Feb 11, 2026
4fc57e1
Merge branch 'astral-sh:main' into feat/6371-isort-headings
Alex-ley-scrub Feb 11, 2026
a3037c2
Revert "fix: add missing `schemars(extend("properties" ...))` to ensu…
Alex-ley-scrub Feb 11, 2026
41dfd96
fix: update settings snapshot after updating branch with upstream
Alex-ley-scrub Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ linter.isort.classes = []
linter.isort.constants = []
linter.isort.variables = []
linter.isort.no_lines_before = []
linter.isort.import_headings = {}
linter.isort.lines_after_imports = -1
linter.isort.lines_between_types = 0
linter.isort.forced_separate = []
Expand Down
11 changes: 11 additions & 0 deletions crates/ruff_linter/resources/test/fixtures/isort/import_heading.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from __future__ import annotations

import os
import sys

import requests
import pandas

from my_first_party import my_first_party_object

from . import my_local_folder_object
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Future imports
from __future__ import annotations

# Standard library imports
import os
import sys

# Third party imports
import pandas
import requests

# First party imports
from my_first_party import my_first_party_object

# Local folder imports
from . import my_local_folder_object
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Future imports
from __future__ import annotations

# Standard library imports
import os
import sys

# Third party imports
import requests
import pandas

# First party imports
from my_first_party import my_first_party_object

from . import my_local_folder_object
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from __future__ import annotations
from typing import Any

import requests
import pandas
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import os
import sys

import requests
import pandas
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import requests
import pandas
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pandas
import os
from __future__ import annotations
import sys
import requests
from my_first_party import my_first_party_object
from . import my_local_folder_object
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from __future__ import annotations

import os
import sys

import requests
import pandas

from my_first_party import my_first_party_object

from . import my_local_folder_object
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Wrong heading
import os
import sys

# Also wrong heading
import pandas
import requests

from my_first_party import my_first_party_object
Loading
Loading