-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into reuse-of-groupby-generator
- Loading branch information
Showing
11 changed files
with
134 additions
and
37 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI025_3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
""" | ||
Tests for PYI025 where the import is marked as re-exported | ||
through usage of a "redundant" `import Set as Set` alias | ||
""" | ||
|
||
from collections.abc import Set as Set # PYI025 triggered but fix is not marked as safe |
6 changes: 6 additions & 0 deletions
6
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI025_3.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
""" | ||
Tests for PYI025 where the import is marked as re-exported | ||
through usage of a "redundant" `import Set as Set` alias | ||
""" | ||
|
||
from collections.abc import Set as Set # PYI025 triggered but fix is not marked as safe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...rules/flake8_pyi/snapshots/ruff_linter__rules__flake8_pyi__tests__PYI025_PYI025_3.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs | ||
--- | ||
PYI025_3.py:6:36: PYI025 [*] Use `from collections.abc import Set as AbstractSet` to avoid confusion with the `set` builtin | ||
| | ||
4 | """ | ||
5 | | ||
6 | from collections.abc import Set as Set # PYI025 triggered but fix is not marked as safe | ||
| ^^^ PYI025 | ||
| | ||
= help: Alias `Set` to `AbstractSet` | ||
|
||
ℹ Unsafe fix | ||
3 3 | through usage of a "redundant" `import Set as Set` alias | ||
4 4 | """ | ||
5 5 | | ||
6 |-from collections.abc import Set as Set # PYI025 triggered but fix is not marked as safe | ||
6 |+from collections.abc import Set as AbstractSet # PYI025 triggered but fix is not marked as safe |
18 changes: 18 additions & 0 deletions
18
...ules/flake8_pyi/snapshots/ruff_linter__rules__flake8_pyi__tests__PYI025_PYI025_3.pyi.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
source: crates/ruff_linter/src/rules/flake8_pyi/mod.rs | ||
--- | ||
PYI025_3.pyi:6:36: PYI025 [*] Use `from collections.abc import Set as AbstractSet` to avoid confusion with the `set` builtin | ||
| | ||
4 | """ | ||
5 | | ||
6 | from collections.abc import Set as Set # PYI025 triggered but fix is not marked as safe | ||
| ^^^ PYI025 | ||
| | ||
= help: Alias `Set` to `AbstractSet` | ||
|
||
ℹ Unsafe fix | ||
3 3 | through usage of a "redundant" `import Set as Set` alias | ||
4 4 | """ | ||
5 5 | | ||
6 |-from collections.abc import Set as Set # PYI025 triggered but fix is not marked as safe | ||
6 |+from collections.abc import Set as AbstractSet # PYI025 triggered but fix is not marked as safe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters