-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
used-before-assignment
FP for generic type syntax (Py 3.12) (#9150
) (#9154) * Fix `used-before-assignment` FP for generic type syntax (Py 3.12) * Bump astroid to 3.0.1 (cherry picked from commit cb29fbd) Co-authored-by: Jacob Walls <[email protected]>
- Loading branch information
1 parent
a77f0c1
commit 759e2cc
Showing
6 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
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,3 @@ | ||
Fix ``used-before-assignment`` false positive for generic type syntax (PEP 695, Python 3.12). | ||
|
||
Closes #9110 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
"""used-before-assignment re: python 3.12 generic typing syntax (PEP 695)""" | ||
|
||
from typing import Callable | ||
type Point[T] = tuple[T, ...] | ||
type Alias[*Ts] = tuple[*Ts] | ||
type Alias[**P] = Callable[P] |
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,2 @@ | ||
[testoptions] | ||
min_pyver=3.12 |