Skip to content

Commit

Permalink
Import Black's type aliases test (#9456)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser authored Jan 10, 2024
1 parent 58fcd96 commit 79f4abb
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"target_version": "py312"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type A=int
type Gen[T]=list[T]
type Alias[T]=lambda: T
type And[T]=T and T
type IfElse[T]=T if T else T
type One = int; type Another = str
class X: type InClass = int

type = aliased
print(type(42))
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type A = int
type Gen[T] = list[T]
type Alias[T] = lambda: T
type And[T] = T and T
type IfElse[T] = T if T else T
type One = int
type Another = str


class X:
type InClass = int


type = aliased
print(type(42))
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@ def import_fixture(fixture: Path, fixture_set: str):

# Uses a different output format
"decorators.py",

# Ruff fails to parse because of a parser bug
"type_aliases.py" # #8900 #8899
]


Expand Down

0 comments on commit 79f4abb

Please sign in to comment.