mirror of https://github.com/astral-sh/ruff
test: update snapshots with missing annotations
These updates center around the addition of annotations in the diagnostic rendering. Previously, the annotation was just not rendered at all. With the `annotate-snippets` upgrade, it is now rendered. I examined a pseudo random sample of these, and they all look correct. As will be true in future batches, some of these snapshots also have changes to whitespace in them as well.
This commit is contained in:
parent
0de8216a25
commit
3fa4479c85
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
|
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
ISC_syntax_error.py:2:5: SyntaxError: missing closing quote in string literal
|
ISC_syntax_error.py:2:5: SyntaxError: missing closing quote in string literal
|
||||||
|
|
|
|
||||||
|
|
@ -59,7 +58,7 @@ ISC_syntax_error.py:4:1: ISC001 Implicitly concatenated string literals on one l
|
||||||
4 | / "a" """b
|
4 | / "a" """b
|
||||||
5 | | c""" "d
|
5 | | c""" "d
|
||||||
| |____^ ISC001
|
| |____^ ISC001
|
||||||
6 |
|
6 |
|
||||||
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
||||||
|
|
|
|
||||||
= help: Combine string literals
|
= help: Combine string literals
|
||||||
|
|
@ -70,7 +69,7 @@ ISC_syntax_error.py:5:6: SyntaxError: missing closing quote in string literal
|
||||||
4 | "a" """b
|
4 | "a" """b
|
||||||
5 | c""" "d
|
5 | c""" "d
|
||||||
| ^
|
| ^
|
||||||
6 |
|
6 |
|
||||||
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
||||||
|
|
|
|
||||||
|
|
||||||
|
|
@ -80,7 +79,7 @@ ISC_syntax_error.py:5:8: SyntaxError: Expected a statement
|
||||||
4 | "a" """b
|
4 | "a" """b
|
||||||
5 | c""" "d
|
5 | c""" "d
|
||||||
| ^
|
| ^
|
||||||
6 |
|
6 |
|
||||||
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
||||||
8 | # unterminated f-strings.
|
8 | # unterminated f-strings.
|
||||||
|
|
|
|
||||||
|
|
@ -144,7 +143,7 @@ ISC_syntax_error.py:11:1: ISC001 Implicitly concatenated string literals on one
|
||||||
11 | / f"a" f"""b
|
11 | / f"a" f"""b
|
||||||
12 | | c""" f"d {e
|
12 | | c""" f"d {e
|
||||||
| |____^ ISC001
|
| |____^ ISC001
|
||||||
13 |
|
13 |
|
||||||
14 | (
|
14 | (
|
||||||
|
|
|
|
||||||
= help: Combine string literals
|
= help: Combine string literals
|
||||||
|
|
@ -173,10 +172,12 @@ ISC_syntax_error.py:30:1: SyntaxError: unexpected EOF while parsing
|
||||||
|
|
|
|
||||||
28 | "i" "j"
|
28 | "i" "j"
|
||||||
29 | )
|
29 | )
|
||||||
|
| ^
|
||||||
|
|
|
|
||||||
|
|
||||||
ISC_syntax_error.py:30:1: SyntaxError: f-string: unterminated string
|
ISC_syntax_error.py:30:1: SyntaxError: f-string: unterminated string
|
||||||
|
|
|
|
||||||
28 | "i" "j"
|
28 | "i" "j"
|
||||||
29 | )
|
29 | )
|
||||||
|
| ^
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
|
source: crates/ruff_linter/src/rules/flake8_implicit_str_concat/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
ISC_syntax_error.py:2:5: SyntaxError: missing closing quote in string literal
|
ISC_syntax_error.py:2:5: SyntaxError: missing closing quote in string literal
|
||||||
|
|
|
|
||||||
|
|
@ -47,7 +46,7 @@ ISC_syntax_error.py:5:6: SyntaxError: missing closing quote in string literal
|
||||||
4 | "a" """b
|
4 | "a" """b
|
||||||
5 | c""" "d
|
5 | c""" "d
|
||||||
| ^
|
| ^
|
||||||
6 |
|
6 |
|
||||||
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
||||||
|
|
|
|
||||||
|
|
||||||
|
|
@ -57,7 +56,7 @@ ISC_syntax_error.py:5:8: SyntaxError: Expected a statement
|
||||||
4 | "a" """b
|
4 | "a" """b
|
||||||
5 | c""" "d
|
5 | c""" "d
|
||||||
| ^
|
| ^
|
||||||
6 |
|
6 |
|
||||||
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
7 | # For f-strings, the `FStringRanges` won't contain the range for
|
||||||
8 | # unterminated f-strings.
|
8 | # unterminated f-strings.
|
||||||
|
|
|
|
||||||
|
|
@ -127,10 +126,12 @@ ISC_syntax_error.py:30:1: SyntaxError: unexpected EOF while parsing
|
||||||
|
|
|
|
||||||
28 | "i" "j"
|
28 | "i" "j"
|
||||||
29 | )
|
29 | )
|
||||||
|
| ^
|
||||||
|
|
|
|
||||||
|
|
||||||
ISC_syntax_error.py:30:1: SyntaxError: f-string: unterminated string
|
ISC_syntax_error.py:30:1: SyntaxError: f-string: unterminated string
|
||||||
|
|
|
|
||||||
28 | "i" "j"
|
28 | "i" "j"
|
||||||
29 | )
|
29 | )
|
||||||
|
| ^
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -12,6 +11,7 @@ separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block
|
||||||
6 | | import foo
|
6 | | import foo
|
||||||
7 | | import foo.bar
|
7 | | import foo.bar
|
||||||
8 | | import foo.bar.baz
|
8 | | import foo.bar.baz
|
||||||
|
| |___________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -12,6 +11,7 @@ separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block
|
||||||
6 | | import foo
|
6 | | import foo
|
||||||
7 | | import foo.bar
|
7 | | import foo.bar
|
||||||
8 | | import foo.bar.baz
|
8 | | import foo.bar.baz
|
||||||
|
| |___________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
add_newline_before_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
add_newline_before_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,6 +10,7 @@ add_newline_before_comments.py:1:1: I001 [*] Import block is un-sorted or un-for
|
||||||
5 | | # This is a comment, but it starts a new section, so we don't need to add a newline
|
5 | | # This is a comment, but it starts a new section, so we don't need to add a newline
|
||||||
6 | | # before it.
|
6 | | # before it.
|
||||||
7 | | import leading_prefix
|
7 | | import leading_prefix
|
||||||
|
| |______________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
as_imports_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
as_imports_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from foo import ( # Comment on `foo`
|
1 | / from foo import ( # Comment on `foo`
|
||||||
2 | | Member as Alias, # Comment on `Alias`
|
2 | | Member as Alias, # Comment on `Alias`
|
||||||
3 | | )
|
3 | | )
|
||||||
4 | |
|
4 | |
|
||||||
5 | | from bar import ( # Comment on `bar`
|
5 | | from bar import ( # Comment on `bar`
|
||||||
6 | | Member, # Comment on `Member`
|
6 | | Member, # Comment on `Member`
|
||||||
7 | | )
|
7 | | )
|
||||||
8 | |
|
8 | |
|
||||||
9 | | from baz import ( # Comment on `baz`
|
9 | | from baz import ( # Comment on `baz`
|
||||||
10 | | Member as Alias # Comment on `Alias`
|
10 | | Member as Alias # Comment on `Alias`
|
||||||
11 | | )
|
11 | | )
|
||||||
12 | |
|
12 | |
|
||||||
13 | | from bop import ( # Comment on `bop`
|
13 | | from bop import ( # Comment on `bop`
|
||||||
14 | | Member # Comment on `Member`
|
14 | | Member # Comment on `Member`
|
||||||
15 | | )
|
15 | | )
|
||||||
|
| |__^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
case_sensitive.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
case_sensitive.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -13,6 +12,7 @@ case_sensitive.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
7 | | import f
|
7 | | import f
|
||||||
8 | | from g import a, B, c
|
8 | | from g import a, B, c
|
||||||
9 | | from h import A, b, C
|
9 | | from h import A, b, C
|
||||||
|
| |______________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
relative_imports_order.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
relative_imports_order.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from ... import a
|
1 | / from ... import a
|
||||||
2 | | from .. import b
|
2 | | from .. import b
|
||||||
3 | | from . import c
|
3 | | from . import c
|
||||||
|
| |________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
combine_as_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
combine_as_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ combine_as_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
2 | | from module import CONSTANT
|
2 | | from module import CONSTANT
|
||||||
3 | | from module import function
|
3 | | from module import function
|
||||||
4 | | from module import function as f
|
4 | | from module import function as f
|
||||||
|
| |_________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
combine_as_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
combine_as_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ combine_as_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
2 | | from module import CONSTANT
|
2 | | from module import CONSTANT
|
||||||
3 | | from module import function
|
3 | | from module import function
|
||||||
4 | | from module import function as f
|
4 | | from module import function as f
|
||||||
|
| |_________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
combine_import_from.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
combine_import_from.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -9,6 +8,7 @@ combine_import_from.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
3 | | from collections import Collection
|
3 | | from collections import Collection
|
||||||
4 | | from collections import ChainMap
|
4 | | from collections import ChainMap
|
||||||
5 | | from collections import MutableSequence, MutableMapping
|
5 | | from collections import MutableSequence, MutableMapping
|
||||||
|
| |________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,22 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
comments.py:3:1: I001 [*] Import block is un-sorted or un-formatted
|
comments.py:3:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | # Comment 1
|
1 | # Comment 1
|
||||||
2 | # Comment 2
|
2 | # Comment 2
|
||||||
3 | / import D
|
3 | / import D
|
||||||
4 | |
|
4 | |
|
||||||
5 | | # Comment 3a
|
5 | | # Comment 3a
|
||||||
6 | | import C
|
6 | | import C
|
||||||
7 | |
|
7 | |
|
||||||
8 | | # Comment 3b
|
8 | | # Comment 3b
|
||||||
9 | | import C
|
9 | | import C
|
||||||
10 | |
|
10 | |
|
||||||
11 | | import B # Comment 4
|
11 | | import B # Comment 4
|
||||||
12 | |
|
12 | |
|
||||||
13 | | # Comment 5
|
13 | | # Comment 5
|
||||||
14 | |
|
14 | |
|
||||||
15 | | # Comment 6
|
15 | | # Comment 6
|
||||||
16 | | from A import (
|
16 | | from A import (
|
||||||
17 | | a, # Comment 7
|
17 | | a, # Comment 7
|
||||||
|
|
@ -29,14 +28,15 @@ comments.py:3:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
23 | | b, # Comment 10
|
23 | | b, # Comment 10
|
||||||
24 | | c, # Comment 11
|
24 | | c, # Comment 11
|
||||||
25 | | )
|
25 | | )
|
||||||
26 | |
|
26 | |
|
||||||
27 | | from D import a_long_name_to_force_multiple_lines # Comment 12
|
27 | | from D import a_long_name_to_force_multiple_lines # Comment 12
|
||||||
28 | | from D import another_long_name_to_force_multiple_lines # Comment 13
|
28 | | from D import another_long_name_to_force_multiple_lines # Comment 13
|
||||||
29 | |
|
29 | |
|
||||||
30 | | from E import a # Comment 1
|
30 | | from E import a # Comment 1
|
||||||
31 | |
|
31 | |
|
||||||
32 | | from F import a # Comment 1
|
32 | | from F import a # Comment 1
|
||||||
33 | | from F import b
|
33 | | from F import b
|
||||||
|
| |________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
deduplicate_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
deduplicate_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ deduplicate_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
2 | | import os
|
2 | | import os
|
||||||
3 | | import os as os1
|
3 | | import os as os1
|
||||||
4 | | import os as os2
|
4 | | import os as os2
|
||||||
|
| |_________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
bar.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
bar.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / import os
|
1 | / import os
|
||||||
2 | | import pandas
|
2 | | import pandas
|
||||||
3 | | import foo.baz
|
3 | | import foo.baz
|
||||||
|
| |_______________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
fit_line_length.py:7:1: I001 [*] Import block is un-sorted or un-formatted
|
fit_line_length.py:7:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -13,6 +12,7 @@ fit_line_length.py:7:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
12 | | from line_with_93 import (
|
12 | | from line_with_93 import (
|
||||||
13 | | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
|
13 | | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
|
||||||
14 | | )
|
14 | | )
|
||||||
|
| |______^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
fit_line_length_comment.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
fit_line_length_comment.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -12,6 +11,7 @@ fit_line_length_comment.py:1:1: I001 [*] Import block is un-sorted or un-formatt
|
||||||
6 | | from f import g # 012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ
|
6 | | from f import g # 012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ
|
||||||
7 | | # The next import doesn't fit on one line.
|
7 | | # The next import doesn't fit on one line.
|
||||||
8 | | from h import i # 012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9
|
8 | | from h import i # 012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9012ß9💣2ℝ9
|
||||||
|
| |__________________________________________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_single_line.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_single_line.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -12,25 +11,26 @@ force_single_line.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
6 | | from json import load
|
6 | | from json import load
|
||||||
7 | | from json import loads as json_loads
|
7 | | from json import loads as json_loads
|
||||||
8 | | from logging.handlers import StreamHandler, FileHandler
|
8 | | from logging.handlers import StreamHandler, FileHandler
|
||||||
9 | |
|
9 | |
|
||||||
10 | | # comment 1
|
10 | | # comment 1
|
||||||
11 | | from third_party import lib1, lib2, \
|
11 | | from third_party import lib1, lib2, \
|
||||||
12 | | lib3, lib7, lib5, lib6
|
12 | | lib3, lib7, lib5, lib6
|
||||||
13 | | # comment 2
|
13 | | # comment 2
|
||||||
14 | | from third_party import lib4
|
14 | | from third_party import lib4
|
||||||
15 | |
|
15 | |
|
||||||
16 | | from foo import bar # comment 3
|
16 | | from foo import bar # comment 3
|
||||||
17 | | from foo2 import bar2 # comment 4
|
17 | | from foo2 import bar2 # comment 4
|
||||||
18 | | from foo3 import bar3, baz3 # comment 5
|
18 | | from foo3 import bar3, baz3 # comment 5
|
||||||
19 | |
|
19 | |
|
||||||
20 | | # comment 6
|
20 | | # comment 6
|
||||||
21 | | from bar import (
|
21 | | from bar import (
|
||||||
22 | | a, # comment 7
|
22 | | a, # comment 7
|
||||||
23 | | b, # comment 8
|
23 | | b, # comment 8
|
||||||
24 | | )
|
24 | | )
|
||||||
25 | |
|
25 | |
|
||||||
26 | | # comment 9
|
26 | | # comment 9
|
||||||
27 | | from baz import * # comment 10
|
27 | | from baz import * # comment 10
|
||||||
|
| |________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_sort_within_sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_sort_within_sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,12 +10,13 @@ force_sort_within_sections.py:1:1: I001 [*] Import block is un-sorted or un-form
|
||||||
5 | | from z import z1
|
5 | | from z import z1
|
||||||
6 | | import b as b1 # import_as
|
6 | | import b as b1 # import_as
|
||||||
7 | | import z
|
7 | | import z
|
||||||
8 | |
|
8 | |
|
||||||
9 | | from ..parent import *
|
9 | | from ..parent import *
|
||||||
10 | | from .my import fn
|
10 | | from .my import fn
|
||||||
11 | | from . import my
|
11 | | from . import my
|
||||||
12 | | from .my.nested import fn2
|
12 | | from .my.nested import fn2
|
||||||
13 | | from ...grandparent import fn3
|
13 | | from ...grandparent import fn3
|
||||||
|
| |_______________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_sort_within_sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_sort_within_sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,12 +10,13 @@ force_sort_within_sections.py:1:1: I001 [*] Import block is un-sorted or un-form
|
||||||
5 | | from z import z1
|
5 | | from z import z1
|
||||||
6 | | import b as b1 # import_as
|
6 | | import b as b1 # import_as
|
||||||
7 | | import z
|
7 | | import z
|
||||||
8 | |
|
8 | |
|
||||||
9 | | from ..parent import *
|
9 | | from ..parent import *
|
||||||
10 | | from .my import fn
|
10 | | from .my import fn
|
||||||
11 | | from . import my
|
11 | | from . import my
|
||||||
12 | | from .my.nested import fn2
|
12 | | from .my.nested import fn2
|
||||||
13 | | from ...grandparent import fn3
|
13 | | from ...grandparent import fn3
|
||||||
|
| |_______________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_sort_within_sections_future.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_sort_within_sections_future.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / import __future__
|
1 | / import __future__
|
||||||
2 | | from __future__ import annotations
|
2 | | from __future__ import annotations
|
||||||
|
| |___________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_sort_within_sections_with_as_names.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_sort_within_sections_with_as_names.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -9,6 +8,7 @@ force_sort_within_sections_with_as_names.py:1:1: I001 [*] Import block is un-sor
|
||||||
3 | | from datetime import timedelta
|
3 | | from datetime import timedelta
|
||||||
4 | | import datetime as dt
|
4 | | import datetime as dt
|
||||||
5 | | import datetime
|
5 | | import datetime
|
||||||
|
| |________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_to_top.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_to_top.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -10,7 +9,7 @@ force_to_top.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
4 | | import lib1
|
4 | | import lib1
|
||||||
5 | | import lib3
|
5 | | import lib3
|
||||||
6 | | import lib4
|
6 | | import lib4
|
||||||
7 | |
|
7 | |
|
||||||
8 | | import foo
|
8 | | import foo
|
||||||
9 | | import z
|
9 | | import z
|
||||||
10 | | from foo import bar
|
10 | | from foo import bar
|
||||||
|
|
@ -22,11 +21,12 @@ force_to_top.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
16 | | from lib5 import lib2
|
16 | | from lib5 import lib2
|
||||||
17 | | from lib4 import lib2
|
17 | | from lib4 import lib2
|
||||||
18 | | from lib5 import lib1
|
18 | | from lib5 import lib1
|
||||||
19 | |
|
19 | |
|
||||||
20 | | import lib3.lib4
|
20 | | import lib3.lib4
|
||||||
21 | | import lib3.lib4.lib5
|
21 | | import lib3.lib4.lib5
|
||||||
22 | | from lib3.lib4 import foo
|
22 | | from lib3.lib4 import foo
|
||||||
23 | | from lib3.lib4.lib5 import foo
|
23 | | from lib3.lib4.lib5 import foo
|
||||||
|
| |_______________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_to_top.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_to_top.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -10,7 +9,7 @@ force_to_top.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
4 | | import lib1
|
4 | | import lib1
|
||||||
5 | | import lib3
|
5 | | import lib3
|
||||||
6 | | import lib4
|
6 | | import lib4
|
||||||
7 | |
|
7 | |
|
||||||
8 | | import foo
|
8 | | import foo
|
||||||
9 | | import z
|
9 | | import z
|
||||||
10 | | from foo import bar
|
10 | | from foo import bar
|
||||||
|
|
@ -22,11 +21,12 @@ force_to_top.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
16 | | from lib5 import lib2
|
16 | | from lib5 import lib2
|
||||||
17 | | from lib4 import lib2
|
17 | | from lib4 import lib2
|
||||||
18 | | from lib5 import lib1
|
18 | | from lib5 import lib1
|
||||||
19 | |
|
19 | |
|
||||||
20 | | import lib3.lib4
|
20 | | import lib3.lib4
|
||||||
21 | | import lib3.lib4.lib5
|
21 | | import lib3.lib4.lib5
|
||||||
22 | | from lib3.lib4 import foo
|
22 | | from lib3.lib4 import foo
|
||||||
23 | | from lib3.lib4.lib5 import foo
|
23 | | from lib3.lib4.lib5 import foo
|
||||||
|
| |_______________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_wrap_aliases.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_wrap_aliases.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from .a import a1 as a1, a2 as a2
|
1 | / from .a import a1 as a1, a2 as a2
|
||||||
2 | | from .b import b1 as b1
|
2 | | from .b import b1 as b1
|
||||||
3 | | from .c import c1
|
3 | | from .c import c1
|
||||||
|
| |__________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
force_wrap_aliases.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
force_wrap_aliases.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from .a import a1 as a1, a2 as a2
|
1 | / from .a import a1 as a1, a2 as a2
|
||||||
2 | | from .b import b1 as b1
|
2 | | from .b import b1 as b1
|
||||||
3 | | from .c import c1
|
3 | | from .c import c1
|
||||||
|
| |__________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
forced_separate.py:3:1: I001 [*] Import block is un-sorted or un-formatted
|
forced_separate.py:3:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -12,6 +11,7 @@ forced_separate.py:3:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
6 | | from experiments.starry import *
|
6 | | from experiments.starry import *
|
||||||
7 | | from experiments.weird import varieties
|
7 | | from experiments.weird import varieties
|
||||||
8 | | from office_helper.assistants import entity_registry as er
|
8 | | from office_helper.assistants import entity_registry as er
|
||||||
|
| |___________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
future_from.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
future_from.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / import __future__
|
1 | / import __future__
|
||||||
2 | | from __future__ import annotations
|
2 | | from __future__ import annotations
|
||||||
|
| |___________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -12,6 +11,7 @@ separate_subpackage_first_and_third_party_imports.py:1:1: I001 [*] Import block
|
||||||
6 | | import foo
|
6 | | import foo
|
||||||
7 | | import foo.bar
|
7 | | import foo.bar
|
||||||
8 | | import foo.bar.baz
|
8 | | import foo.bar.baz
|
||||||
|
| |___________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
if_elif_else.py:6:1: I001 [*] Import block is un-sorted or un-formatted
|
if_elif_else.py:6:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ if_elif_else.py:6:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
5 | else:
|
5 | else:
|
||||||
6 | / from setuptools.command.sdist import sdist as _sdist
|
6 | / from setuptools.command.sdist import sdist as _sdist
|
||||||
7 | | from distutils.command.sdist import sdist as _sdist
|
7 | | from distutils.command.sdist import sdist as _sdist
|
||||||
|
| |________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
import_from_after_import.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
import_from_after_import.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from collections import Collection
|
1 | / from collections import Collection
|
||||||
2 | | import os
|
2 | | import os
|
||||||
|
| |__________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,20 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
inline_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
inline_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from a.prometheus.metrics import ( # type:ignore[attr-defined]
|
1 | / from a.prometheus.metrics import ( # type:ignore[attr-defined]
|
||||||
2 | | TERMINAL_CURRENTLY_RUNNING_TOTAL,
|
2 | | TERMINAL_CURRENTLY_RUNNING_TOTAL,
|
||||||
3 | | )
|
3 | | )
|
||||||
4 | |
|
4 | |
|
||||||
5 | | from b.prometheus.metrics import (
|
5 | | from b.prometheus.metrics import (
|
||||||
6 | | TERMINAL_CURRENTLY_RUNNING_TOTAL, # type:ignore[attr-defined]
|
6 | | TERMINAL_CURRENTLY_RUNNING_TOTAL, # type:ignore[attr-defined]
|
||||||
7 | | )
|
7 | | )
|
||||||
8 | |
|
8 | |
|
||||||
9 | | from c.prometheus.metrics import TERMINAL_CURRENTLY_RUNNING_TOTAL # type:ignore[attr-defined]
|
9 | | from c.prometheus.metrics import TERMINAL_CURRENTLY_RUNNING_TOTAL # type:ignore[attr-defined]
|
||||||
10 | |
|
10 | |
|
||||||
11 | | from d.prometheus.metrics import TERMINAL_CURRENTLY_RUNNING_TOTAL, OTHER_RUNNING_TOTAL # type:ignore[attr-defined]
|
11 | | from d.prometheus.metrics import TERMINAL_CURRENTLY_RUNNING_TOTAL, OTHER_RUNNING_TOTAL # type:ignore[attr-defined]
|
||||||
|
| |____________________________________________________________________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,6 +10,7 @@ separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-f
|
||||||
5 | | from . import leading_prefix
|
5 | | from . import leading_prefix
|
||||||
6 | | from .. import trailing_prefix
|
6 | | from .. import trailing_prefix
|
||||||
7 | | from ruff import check
|
7 | | from ruff import check
|
||||||
|
| |_______________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,6 +10,7 @@ separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-f
|
||||||
5 | | from . import leading_prefix
|
5 | | from . import leading_prefix
|
||||||
6 | | from .. import trailing_prefix
|
6 | | from .. import trailing_prefix
|
||||||
7 | | from ruff import check
|
7 | | from ruff import check
|
||||||
|
| |_______________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_from_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_from_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from mediuuuuuuuuuuum import a
|
1 | / from mediuuuuuuuuuuum import a
|
||||||
2 | | from short import b
|
2 | | from short import b
|
||||||
3 | | from loooooooooooooooooooooog import c
|
3 | | from loooooooooooooooooooooog import c
|
||||||
|
| |_______________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_non_ascii_members.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_non_ascii_members.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -15,6 +14,7 @@ length_sort_non_ascii_members.py:1:1: I001 [*] Import block is un-sorted or un-f
|
||||||
9 | | mediuuuuuum,
|
9 | | mediuuuuuum,
|
||||||
10 | | λοοοοοοοοοοοοοονγ,
|
10 | | λοοοοοοοοοοοοοονγ,
|
||||||
11 | | )
|
11 | | )
|
||||||
|
| |__^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_non_ascii_modules.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_non_ascii_modules.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -13,6 +12,7 @@ length_sort_non_ascii_modules.py:1:1: I001 [*] Import block is un-sorted or un-f
|
||||||
7 | | import λοοοοοοοοοοοοοονγ
|
7 | | import λοοοοοοοοοοοοοονγ
|
||||||
8 | | import μεδιυυυυυμ
|
8 | | import μεδιυυυυυμ
|
||||||
9 | | import looooooooooooooong
|
9 | | import looooooooooooooong
|
||||||
|
| |__________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_straight_and_from_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_straight_and_from_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -10,6 +9,7 @@ length_sort_straight_and_from_imports.py:1:1: I001 [*] Import block is un-sorted
|
||||||
4 | | from looooooooooooooong import a
|
4 | | from looooooooooooooong import a
|
||||||
5 | | from mediuuuum import c
|
5 | | from mediuuuum import c
|
||||||
6 | | from short import b
|
6 | | from short import b
|
||||||
|
| |____________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_straight_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_straight_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ length_sort_straight_imports.py:1:1: I001 [*] Import block is un-sorted or un-fo
|
||||||
2 | | import short
|
2 | | import short
|
||||||
3 | | import looooooooooooooooong
|
3 | | import looooooooooooooooong
|
||||||
4 | | import mediuuuuuuma
|
4 | | import mediuuuuuuma
|
||||||
|
| |____________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_with_relative_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_with_relative_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,6 +10,7 @@ length_sort_with_relative_imports.py:1:1: I001 [*] Import block is un-sorted or
|
||||||
5 | | from . import d
|
5 | | from . import d
|
||||||
6 | | from .mediuuuum import a
|
6 | | from .mediuuuum import a
|
||||||
7 | | from ......short import b
|
7 | | from ......short import b
|
||||||
|
| |__________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_from_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_from_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from mediuuuuuuuuuuum import a
|
1 | / from mediuuuuuuuuuuum import a
|
||||||
2 | | from short import b
|
2 | | from short import b
|
||||||
3 | | from loooooooooooooooooooooog import c
|
3 | | from loooooooooooooooooooooog import c
|
||||||
|
| |_______________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_straight_and_from_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_straight_and_from_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -10,6 +9,7 @@ length_sort_straight_and_from_imports.py:1:1: I001 [*] Import block is un-sorted
|
||||||
4 | | from looooooooooooooong import a
|
4 | | from looooooooooooooong import a
|
||||||
5 | | from mediuuuum import c
|
5 | | from mediuuuum import c
|
||||||
6 | | from short import b
|
6 | | from short import b
|
||||||
|
| |____________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
length_sort_straight_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
length_sort_straight_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ length_sort_straight_imports.py:1:1: I001 [*] Import block is un-sorted or un-fo
|
||||||
2 | | import short
|
2 | | import short
|
||||||
3 | | import looooooooooooooooong
|
3 | | import looooooooooooooooong
|
||||||
4 | | import mediuuuuuuma
|
4 | | import mediuuuuuuma
|
||||||
|
| |____________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
lines_after_imports_nothing_after.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
lines_after_imports_nothing_after.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from __future__ import annotations
|
1 | / from __future__ import annotations
|
||||||
2 | |
|
2 | |
|
||||||
3 | | from typing import Any
|
3 | | from typing import Any
|
||||||
4 | |
|
4 | |
|
||||||
5 | | from requests import Session
|
5 | | from requests import Session
|
||||||
6 | |
|
6 | |
|
||||||
7 | | from my_first_party import my_first_party_object
|
7 | | from my_first_party import my_first_party_object
|
||||||
8 | |
|
8 | |
|
||||||
9 | | from . import my_local_folder_object
|
9 | | from . import my_local_folder_object
|
||||||
|
| |_____________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
lines_between_types.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
lines_between_types.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from __future__ import annotations
|
1 | / from __future__ import annotations
|
||||||
2 | |
|
2 | |
|
||||||
3 | | import datetime
|
3 | | import datetime
|
||||||
4 | | import json
|
4 | | import json
|
||||||
5 | |
|
5 | |
|
||||||
6 | |
|
6 | |
|
||||||
7 | | from binascii import hexlify
|
7 | | from binascii import hexlify
|
||||||
8 | |
|
8 | |
|
||||||
9 | | import requests
|
9 | | import requests
|
||||||
10 | |
|
10 | |
|
||||||
11 | |
|
11 | |
|
||||||
12 | | from sanic import Sanic
|
12 | | from sanic import Sanic
|
||||||
13 | | from loguru import Logger
|
13 | | from loguru import Logger
|
||||||
14 | |
|
14 | |
|
||||||
15 | | from . import config
|
15 | | from . import config
|
||||||
16 | | from .data import Data
|
16 | | from .data import Data
|
||||||
|
| |_______________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
magic_trailing_comma.py:2:1: I001 [*] Import block is un-sorted or un-formatted
|
magic_trailing_comma.py:2:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,7 +10,7 @@ magic_trailing_comma.py:2:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
5 | | stdout,
|
5 | | stdout,
|
||||||
6 | | exit,
|
6 | | exit,
|
||||||
7 | | )
|
7 | | )
|
||||||
8 | |
|
8 | |
|
||||||
9 | | # No magic comma, this will be rolled into one line.
|
9 | | # No magic comma, this will be rolled into one line.
|
||||||
10 | | from os import (
|
10 | | from os import (
|
||||||
11 | | path,
|
11 | | path,
|
||||||
|
|
@ -19,29 +18,30 @@ magic_trailing_comma.py:2:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
13 | | execl,
|
13 | | execl,
|
||||||
14 | | execv
|
14 | | execv
|
||||||
15 | | )
|
15 | | )
|
||||||
16 | |
|
16 | |
|
||||||
17 | | from glob import (
|
17 | | from glob import (
|
||||||
18 | | glob,
|
18 | | glob,
|
||||||
19 | | iglob,
|
19 | | iglob,
|
||||||
20 | | escape, # Ends with a comment, should still treat as magic trailing comma.
|
20 | | escape, # Ends with a comment, should still treat as magic trailing comma.
|
||||||
21 | | )
|
21 | | )
|
||||||
22 | |
|
22 | |
|
||||||
23 | | # These will be combined, but without a trailing comma.
|
23 | | # These will be combined, but without a trailing comma.
|
||||||
24 | | from foo import bar
|
24 | | from foo import bar
|
||||||
25 | | from foo import baz
|
25 | | from foo import baz
|
||||||
26 | |
|
26 | |
|
||||||
27 | | # These will be combined, _with_ a trailing comma.
|
27 | | # These will be combined, _with_ a trailing comma.
|
||||||
28 | | from module1 import member1
|
28 | | from module1 import member1
|
||||||
29 | | from module1 import (
|
29 | | from module1 import (
|
||||||
30 | | member2,
|
30 | | member2,
|
||||||
31 | | member3,
|
31 | | member3,
|
||||||
32 | | )
|
32 | | )
|
||||||
33 | |
|
33 | |
|
||||||
34 | | # These will be combined, _with_ a trailing comma.
|
34 | | # These will be combined, _with_ a trailing comma.
|
||||||
35 | | from module2 import member1, member2
|
35 | | from module2 import member1, member2
|
||||||
36 | | from module2 import (
|
36 | | from module2 import (
|
||||||
37 | | member3,
|
37 | | member3,
|
||||||
38 | | )
|
38 | | )
|
||||||
|
| |__^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
natural_order.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
natural_order.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -20,6 +19,7 @@ natural_order.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
14 | | uint32,
|
14 | | uint32,
|
||||||
15 | | uint64,
|
15 | | uint64,
|
||||||
16 | | )
|
16 | | )
|
||||||
|
| |__^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
bar.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
bar.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / import os
|
1 | / import os
|
||||||
2 | | import pandas
|
2 | | import pandas
|
||||||
3 | | import foo.baz
|
3 | | import foo.baz
|
||||||
|
| |_______________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
no_lines_before.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
no_lines_before.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from __future__ import annotations
|
1 | / from __future__ import annotations
|
||||||
2 | |
|
2 | |
|
||||||
3 | | from typing import Any
|
3 | | from typing import Any
|
||||||
4 | |
|
4 | |
|
||||||
5 | | from requests import Session
|
5 | | from requests import Session
|
||||||
6 | |
|
6 | |
|
||||||
7 | | from my_first_party import my_first_party_object
|
7 | | from my_first_party import my_first_party_object
|
||||||
8 | |
|
8 | |
|
||||||
9 | | from . import my_local_folder_object
|
9 | | from . import my_local_folder_object
|
||||||
|
| |_____________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
no_lines_before.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
no_lines_before.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from __future__ import annotations
|
1 | / from __future__ import annotations
|
||||||
2 | |
|
2 | |
|
||||||
3 | | from typing import Any
|
3 | | from typing import Any
|
||||||
4 | |
|
4 | |
|
||||||
5 | | from requests import Session
|
5 | | from requests import Session
|
||||||
6 | |
|
6 | |
|
||||||
7 | | from my_first_party import my_first_party_object
|
7 | | from my_first_party import my_first_party_object
|
||||||
8 | |
|
8 | |
|
||||||
9 | | from . import my_local_folder_object
|
9 | | from . import my_local_folder_object
|
||||||
|
| |_____________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
no_lines_before_with_empty_sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
no_lines_before_with_empty_sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from __future__ import annotations
|
1 | / from __future__ import annotations
|
||||||
2 | | from typing import Any
|
2 | | from typing import Any
|
||||||
3 | | from . import my_local_folder_object
|
3 | | from . import my_local_folder_object
|
||||||
|
| |_____________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
no_standard_library.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
no_standard_library.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from __future__ import annotations
|
1 | / from __future__ import annotations
|
||||||
2 | |
|
2 | |
|
||||||
3 | | import os
|
3 | | import os
|
||||||
4 | | import django.settings
|
4 | | import django.settings
|
||||||
5 | | from library import foo
|
5 | | from library import foo
|
||||||
6 | | import pytz
|
6 | | import pytz
|
||||||
7 | |
|
7 | |
|
||||||
8 | | from . import local
|
8 | | from . import local
|
||||||
9 | | import sys
|
9 | | import sys
|
||||||
|
| |___________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_by_type.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_by_type.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -16,6 +15,7 @@ order_by_type.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
10 | | import FOO
|
10 | | import FOO
|
||||||
11 | | import BAR
|
11 | | import BAR
|
||||||
12 | | import bar
|
12 | | import bar
|
||||||
|
| |___________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_by_type.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_by_type.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -16,6 +15,7 @@ order_by_type.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
10 | | import FOO
|
10 | | import FOO
|
||||||
11 | | import BAR
|
11 | | import BAR
|
||||||
12 | | import bar
|
12 | | import bar
|
||||||
|
| |___________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_by_type_with_custom_classes.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_by_type_with_custom_classes.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ order_by_type_with_custom_classes.py:1:1: I001 [*] Import block is un-sorted or
|
||||||
2 | | from subprocess import N_CLASS, PIPE, Popen, STDOUT
|
2 | | from subprocess import N_CLASS, PIPE, Popen, STDOUT
|
||||||
3 | | from module import CLASS, Class, CONSTANT, function, BASIC, Apple
|
3 | | from module import CLASS, Class, CONSTANT, function, BASIC, Apple
|
||||||
4 | | from torch.nn import SELU, AClass, A_CONSTANT
|
4 | | from torch.nn import SELU, AClass, A_CONSTANT
|
||||||
|
| |______________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_by_type_with_custom_classes.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_by_type_with_custom_classes.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ order_by_type_with_custom_classes.py:1:1: I001 [*] Import block is un-sorted or
|
||||||
2 | | from subprocess import N_CLASS, PIPE, Popen, STDOUT
|
2 | | from subprocess import N_CLASS, PIPE, Popen, STDOUT
|
||||||
3 | | from module import CLASS, Class, CONSTANT, function, BASIC, Apple
|
3 | | from module import CLASS, Class, CONSTANT, function, BASIC, Apple
|
||||||
4 | | from torch.nn import SELU, AClass, A_CONSTANT
|
4 | | from torch.nn import SELU, AClass, A_CONSTANT
|
||||||
|
| |______________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_by_type_with_custom_constants.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_by_type_with_custom_constants.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from sklearn.svm import XYZ, func, variable, Const, Klass, constant
|
1 | / from sklearn.svm import XYZ, func, variable, Const, Klass, constant
|
||||||
2 | | from subprocess import First, var, func, Class, konst, A_constant, Last, STDOUT
|
2 | | from subprocess import First, var, func, Class, konst, A_constant, Last, STDOUT
|
||||||
|
| |________________________________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_by_type_with_custom_constants.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_by_type_with_custom_constants.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from sklearn.svm import XYZ, func, variable, Const, Klass, constant
|
1 | / from sklearn.svm import XYZ, func, variable, Const, Klass, constant
|
||||||
2 | | from subprocess import First, var, func, Class, konst, A_constant, Last, STDOUT
|
2 | | from subprocess import First, var, func, Class, konst, A_constant, Last, STDOUT
|
||||||
|
| |________________________________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_by_type_with_custom_variables.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_by_type_with_custom_variables.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from sklearn.svm import VAR, Class, MyVar, CONST, abc
|
1 | / from sklearn.svm import VAR, Class, MyVar, CONST, abc
|
||||||
2 | | from subprocess import utils, var_ABC, Variable, Klass, CONSTANT, exe
|
2 | | from subprocess import utils, var_ABC, Variable, Klass, CONSTANT, exe
|
||||||
|
| |______________________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_by_type_with_custom_variables.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_by_type_with_custom_variables.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from sklearn.svm import VAR, Class, MyVar, CONST, abc
|
1 | / from sklearn.svm import VAR, Class, MyVar, CONST, abc
|
||||||
2 | | from subprocess import utils, var_ABC, Variable, Klass, CONSTANT, exe
|
2 | | from subprocess import utils, var_ABC, Variable, Klass, CONSTANT, exe
|
||||||
|
| |______________________________________________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
order_relative_imports_by_level.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
order_relative_imports_by_level.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ order_relative_imports_by_level.py:1:1: I001 [*] Import block is un-sorted or un
|
||||||
2 | | from ..a import a
|
2 | | from ..a import a
|
||||||
3 | | from ..b import a
|
3 | | from ..b import a
|
||||||
4 | | from .b import a
|
4 | | from .b import a
|
||||||
|
| |_________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
preserve_comment_order.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
preserve_comment_order.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -15,6 +14,7 @@ preserve_comment_order.py:1:1: I001 [*] Import block is un-sorted or un-formatte
|
||||||
9 | | # EIEIO
|
9 | | # EIEIO
|
||||||
10 | | from errno import EIO
|
10 | | from errno import EIO
|
||||||
11 | | import abc
|
11 | | import abc
|
||||||
|
| |___________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
preserve_import_star.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
preserve_import_star.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -10,6 +9,7 @@ preserve_import_star.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
4 | | from some_module import some_class # Aside
|
4 | | from some_module import some_class # Aside
|
||||||
5 | | # Above
|
5 | | # Above
|
||||||
6 | | from some_module import * # Aside
|
6 | | from some_module import * # Aside
|
||||||
|
| |___________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
propagate_inline_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
propagate_inline_comments.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ propagate_inline_comments.py:1:1: I001 [*] Import block is un-sorted or un-forma
|
||||||
2 | | a_long_variable_name_that_causes_problems,
|
2 | | a_long_variable_name_that_causes_problems,
|
||||||
3 | | items,
|
3 | | items,
|
||||||
4 | | )
|
4 | | )
|
||||||
|
| |__^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
reorder_within_section.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
reorder_within_section.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / import sys
|
1 | / import sys
|
||||||
2 | | import os
|
2 | | import os
|
||||||
|
| |__________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,6 +10,7 @@ sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
5 | | import django.settings
|
5 | | import django.settings
|
||||||
6 | | from library import foo
|
6 | | from library import foo
|
||||||
7 | | from . import local
|
7 | | from . import local
|
||||||
|
| |____________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,6 +10,7 @@ sections.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
5 | | import django.settings
|
5 | | import django.settings
|
||||||
6 | | from library import foo
|
6 | | from library import foo
|
||||||
7 | | from . import local
|
7 | | from . import local
|
||||||
|
| |____________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_first_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_first_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -9,6 +8,7 @@ separate_first_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-fo
|
||||||
3 | | import numpy as np
|
3 | | import numpy as np
|
||||||
4 | | import os
|
4 | | import os
|
||||||
5 | | from leading_prefix import Class
|
5 | | from leading_prefix import Class
|
||||||
|
| |_________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_future_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_future_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / import sys
|
1 | / import sys
|
||||||
2 | | import os
|
2 | | import os
|
||||||
3 | | from __future__ import annotations
|
3 | | from __future__ import annotations
|
||||||
|
| |___________________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,6 +10,7 @@ separate_local_folder_imports.py:1:1: I001 [*] Import block is un-sorted or un-f
|
||||||
5 | | from . import leading_prefix
|
5 | | from . import leading_prefix
|
||||||
6 | | from .. import trailing_prefix
|
6 | | from .. import trailing_prefix
|
||||||
7 | | from ruff import check
|
7 | | from ruff import check
|
||||||
|
| |_______________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
separate_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
separate_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -8,6 +7,7 @@ separate_third_party_imports.py:1:1: I001 [*] Import block is un-sorted or un-fo
|
||||||
2 | | import sys
|
2 | | import sys
|
||||||
3 | | import numpy as np
|
3 | | import numpy as np
|
||||||
4 | | import os
|
4 | | import os
|
||||||
|
| |__________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
sort_similar_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
sort_similar_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -19,17 +18,18 @@ sort_similar_imports.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
13 | | from a import b as y
|
13 | | from a import b as y
|
||||||
14 | | from b import C
|
14 | | from b import C
|
||||||
15 | | from b import c as d
|
15 | | from b import c as d
|
||||||
16 | |
|
16 | |
|
||||||
17 | | import A
|
17 | | import A
|
||||||
18 | | import a
|
18 | | import a
|
||||||
19 | | import b
|
19 | | import b
|
||||||
20 | | import B
|
20 | | import B
|
||||||
21 | |
|
21 | |
|
||||||
22 | | import x as y
|
22 | | import x as y
|
||||||
23 | | import x as A
|
23 | | import x as A
|
||||||
24 | | import x as Y
|
24 | | import x as Y
|
||||||
25 | | import x
|
25 | | import x
|
||||||
26 | | import x as a
|
26 | | import x as a
|
||||||
|
| |______________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
magic_trailing_comma.py:2:1: I001 [*] Import block is un-sorted or un-formatted
|
magic_trailing_comma.py:2:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
|
|
@ -11,7 +10,7 @@ magic_trailing_comma.py:2:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
5 | | stdout,
|
5 | | stdout,
|
||||||
6 | | exit,
|
6 | | exit,
|
||||||
7 | | )
|
7 | | )
|
||||||
8 | |
|
8 | |
|
||||||
9 | | # No magic comma, this will be rolled into one line.
|
9 | | # No magic comma, this will be rolled into one line.
|
||||||
10 | | from os import (
|
10 | | from os import (
|
||||||
11 | | path,
|
11 | | path,
|
||||||
|
|
@ -19,29 +18,30 @@ magic_trailing_comma.py:2:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
13 | | execl,
|
13 | | execl,
|
||||||
14 | | execv
|
14 | | execv
|
||||||
15 | | )
|
15 | | )
|
||||||
16 | |
|
16 | |
|
||||||
17 | | from glob import (
|
17 | | from glob import (
|
||||||
18 | | glob,
|
18 | | glob,
|
||||||
19 | | iglob,
|
19 | | iglob,
|
||||||
20 | | escape, # Ends with a comment, should still treat as magic trailing comma.
|
20 | | escape, # Ends with a comment, should still treat as magic trailing comma.
|
||||||
21 | | )
|
21 | | )
|
||||||
22 | |
|
22 | |
|
||||||
23 | | # These will be combined, but without a trailing comma.
|
23 | | # These will be combined, but without a trailing comma.
|
||||||
24 | | from foo import bar
|
24 | | from foo import bar
|
||||||
25 | | from foo import baz
|
25 | | from foo import baz
|
||||||
26 | |
|
26 | |
|
||||||
27 | | # These will be combined, _with_ a trailing comma.
|
27 | | # These will be combined, _with_ a trailing comma.
|
||||||
28 | | from module1 import member1
|
28 | | from module1 import member1
|
||||||
29 | | from module1 import (
|
29 | | from module1 import (
|
||||||
30 | | member2,
|
30 | | member2,
|
||||||
31 | | member3,
|
31 | | member3,
|
||||||
32 | | )
|
32 | | )
|
||||||
33 | |
|
33 | |
|
||||||
34 | | # These will be combined, _with_ a trailing comma.
|
34 | | # These will be combined, _with_ a trailing comma.
|
||||||
35 | | from module2 import member1, member2
|
35 | | from module2 import member1, member2
|
||||||
36 | | from module2 import (
|
36 | | from module2 import (
|
||||||
37 | | member3,
|
37 | | member3,
|
||||||
38 | | )
|
38 | | )
|
||||||
|
| |__^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/isort/mod.rs
|
source: crates/ruff_linter/src/rules/isort/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
star_before_others.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
star_before_others.py:1:1: I001 [*] Import block is un-sorted or un-formatted
|
||||||
|
|
|
|
||||||
1 | / from .logging import config_logging
|
1 | / from .logging import config_logging
|
||||||
2 | | from .settings import ENV
|
2 | | from .settings import ENV
|
||||||
3 | | from .settings import *
|
3 | | from .settings import *
|
||||||
|
| |________________________^ I001
|
||||||
|
|
|
|
||||||
= help: Organize imports
|
= help: Organize imports
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,15 +1,15 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
source: crates/ruff_linter/src/rules/pycodestyle/mod.rs
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
W391_2.py:14:1: W391 [*] Too many newlines at end of file
|
W391_2.py:14:1: W391 [*] Too many newlines at end of file
|
||||||
|
|
|
|
||||||
12 | foo()
|
12 | foo()
|
||||||
13 | bar()
|
13 | bar()
|
||||||
14 | /
|
14 | /
|
||||||
15 | |
|
15 | |
|
||||||
16 | |
|
16 | |
|
||||||
17 | |
|
17 | |
|
||||||
|
| |__^ W391
|
||||||
|
|
|
|
||||||
= help: Remove trailing newlines
|
= help: Remove trailing newlines
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/inline/err/del_incomplete_target.py
|
input_file: crates/ruff_python_parser/resources/inline/err/del_incomplete_target.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -122,4 +121,5 @@ Module(
|
||||||
|
|
|
|
||||||
3 | del x, y[
|
3 | del x, y[
|
||||||
4 | z
|
4 | z
|
||||||
|
| ^ Syntax Error: unexpected EOF while parsing
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/inline/err/function_def_unclosed_parameter_list.py
|
input_file: crates/ruff_python_parser/resources/inline/err/function_def_unclosed_parameter_list.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -231,4 +230,5 @@ Module(
|
||||||
|
|
|
|
||||||
4 | def foo(a: int, b: str
|
4 | def foo(a: int, b: str
|
||||||
5 | x = 10
|
5 | x = 10
|
||||||
|
| ^ Syntax Error: unexpected EOF while parsing
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/inline/err/match_stmt_expect_indented_block.py
|
input_file: crates/ruff_python_parser/resources/inline/err/match_stmt_expect_indented_block.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -63,4 +62,5 @@ Module(
|
||||||
|
|
|
|
||||||
1 | match foo:
|
1 | match foo:
|
||||||
2 | case _: ...
|
2 | case _: ...
|
||||||
|
| ^ Syntax Error: Expected dedent, found end of file
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/inline/err/match_stmt_no_newline_before_case.py
|
input_file: crates/ruff_python_parser/resources/inline/err/match_stmt_no_newline_before_case.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -61,4 +60,5 @@ Module(
|
||||||
|
|
||||||
|
|
|
|
||||||
1 | match foo: case _: ...
|
1 | match foo: case _: ...
|
||||||
|
| ^ Syntax Error: Expected dedent, found end of file
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/inline/err/node_range_with_gaps.py
|
input_file: crates/ruff_python_parser/resources/inline/err/node_range_with_gaps.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -120,4 +119,5 @@ Module(
|
||||||
|
|
|
|
||||||
2 | def bar(): ...
|
2 | def bar(): ...
|
||||||
3 | def baz
|
3 | def baz
|
||||||
|
| ^ Syntax Error: Expected ')', found end of file
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/invalid/statements/if_extra_closing_parentheses.py
|
input_file: crates/ruff_python_parser/resources/invalid/statements/if_extra_closing_parentheses.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -77,4 +76,5 @@ Module(
|
||||||
|
|
|
|
||||||
2 | if True)):
|
2 | if True)):
|
||||||
3 | pass
|
3 | pass
|
||||||
|
| ^ Syntax Error: Expected a statement
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/invalid/statements/match/as_pattern_2.py
|
input_file: crates/ruff_python_parser/resources/invalid/statements/match/as_pattern_2.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -124,4 +123,5 @@ Module(
|
||||||
|
|
|
|
||||||
4 | case x as y + 1j:
|
4 | case x as y + 1j:
|
||||||
5 | pass
|
5 | pass
|
||||||
|
| ^ Syntax Error: Expected a statement
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/invalid/statements/match/as_pattern_3.py
|
input_file: crates/ruff_python_parser/resources/invalid/statements/match/as_pattern_3.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -152,4 +151,5 @@ Module(
|
||||||
|
|
|
|
||||||
4 | case {(x as y): 1}:
|
4 | case {(x as y): 1}:
|
||||||
5 | pass
|
5 | pass
|
||||||
|
| ^ Syntax Error: Expected a statement
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/inline/err/try_stmt_invalid_order.py
|
input_file: crates/ruff_python_parser/resources/inline/err/try_stmt_invalid_order.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -81,4 +80,5 @@ Module(
|
||||||
|
|
|
|
||||||
5 | else:
|
5 | else:
|
||||||
6 | pass
|
6 | pass
|
||||||
|
| ^ Syntax Error: Expected a statement
|
||||||
|
|
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
---
|
---
|
||||||
source: crates/ruff_python_parser/tests/fixtures.rs
|
source: crates/ruff_python_parser/tests/fixtures.rs
|
||||||
input_file: crates/ruff_python_parser/resources/inline/err/try_stmt_missing_except_finally.py
|
input_file: crates/ruff_python_parser/resources/inline/err/try_stmt_missing_except_finally.py
|
||||||
snapshot_kind: text
|
|
||||||
---
|
---
|
||||||
## AST
|
## AST
|
||||||
|
|
||||||
|
|
@ -67,4 +66,5 @@ Module(
|
||||||
|
|
|
|
||||||
5 | else:
|
5 | else:
|
||||||
6 | pass
|
6 | pass
|
||||||
|
| ^ Syntax Error: Expected `except` or `finally` after `try` block
|
||||||
|
|
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue