Skip to content

Commit

Permalink
New syntax does not need to be enabled with a flag
Browse files Browse the repository at this point in the history
  • Loading branch information
JukkaL committed Sep 20, 2024
1 parent d201e50 commit ae08763
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions test-data/unit/check-python312.test
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ inv3_2: Invariant3[int] = Invariant3[float](1) # E: Incompatible types in assig
[builtins fixtures/property.pyi]

[case testPEP695InferVarianceWithInheritedSelf]
# flags: --enable-incomplete-feature=NewGenericSyntax
from typing import overload, Self, TypeVar, Generic

T = TypeVar("T")
Expand All @@ -413,7 +412,6 @@ a3: D[int, int] = D[object, object]() # E: Incompatible types in assignment (ex
a4: D[object, int] = D[int, object]() # E: Incompatible types in assignment (expression has type "D[int, object]", variable has type "D[object, int]")

[case testPEP695InferVarianceWithReturnSelf]
# flags: --enable-incomplete-feature=NewGenericSyntax
from typing import Self, overload

class Cov[T]:
Expand Down
2 changes: 1 addition & 1 deletion test-data/unit/pythoneval.test
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,7 @@ type L1 = Never
type L2 = list[Never]

[case testPEP695VarianceInferenceSpecialCaseWithTypeshed]
# flags: --python-version=3.12 --enable-incomplete-feature=NewGenericSyntax
# flags: --python-version=3.12
class C1[T1, T2](list[T1]):
def m(self, a: T2) -> None: ...

Expand Down

0 comments on commit ae08763

Please sign in to comment.