-
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.
Import Black's type aliases test (#9456)
- Loading branch information
1 parent
58fcd96
commit 79f4abb
Showing
4 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
crates/ruff_python_formatter/resources/test/fixtures/black/cases/type_aliases.options.json
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 @@ | ||
{"target_version": "py312"} |
10 changes: 10 additions & 0 deletions
10
crates/ruff_python_formatter/resources/test/fixtures/black/cases/type_aliases.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,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)) |
15 changes: 15 additions & 0 deletions
15
crates/ruff_python_formatter/resources/test/fixtures/black/cases/type_aliases.py.expect
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,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)) |
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