mirror of
https://github.com/astral-sh/ruff
synced 2026-01-08 15:14:19 -05:00
fix: Use BestFit layout for subscript (#7409)
This commit is contained in:
@@ -276,6 +276,9 @@ result = (
|
||||
f(111111111111111111111111111111111111111111111111111111111111111111111111111111111)
|
||||
+ 1
|
||||
)()
|
||||
|
||||
|
||||
result = (object[complicate_caller])("argument").a["b"].test(argument)
|
||||
```
|
||||
|
||||
## Output
|
||||
@@ -548,6 +551,9 @@ result = (
|
||||
f(111111111111111111111111111111111111111111111111111111111111111111111111111111111)
|
||||
+ 1
|
||||
)()
|
||||
|
||||
|
||||
result = (object[complicate_caller])("argument").a["b"].test(argument)
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -60,6 +60,19 @@ x = (
|
||||
c,
|
||||
]
|
||||
) = 1
|
||||
|
||||
def main() -> None:
|
||||
if True:
|
||||
some_very_long_variable_name_abcdefghijk = some_very_long_variable_name_abcdefghijk[
|
||||
some_very_long_variable_name_abcdefghijk.some_very_long_attribute_name
|
||||
== "This is a very long string abcdefghijk"
|
||||
]
|
||||
|
||||
organization_application = (
|
||||
organization_service.get_organization_applications_by_name(
|
||||
db_request.POST["name"]
|
||||
)
|
||||
)[0]
|
||||
```
|
||||
|
||||
## Output
|
||||
@@ -122,6 +135,22 @@ x = [ # comment
|
||||
b,
|
||||
c,
|
||||
] = 1
|
||||
|
||||
|
||||
def main() -> None:
|
||||
if True:
|
||||
some_very_long_variable_name_abcdefghijk = (
|
||||
some_very_long_variable_name_abcdefghijk[
|
||||
some_very_long_variable_name_abcdefghijk.some_very_long_attribute_name
|
||||
== "This is a very long string abcdefghijk"
|
||||
]
|
||||
)
|
||||
|
||||
organization_application = (
|
||||
organization_service.get_organization_applications_by_name(
|
||||
db_request.POST["name"]
|
||||
)
|
||||
)[0]
|
||||
```
|
||||
|
||||
|
||||
|
||||
@@ -186,6 +186,12 @@ def double(a: int) -> (
|
||||
int | list[int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int] # Hello
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
def process_board_action(
|
||||
payload: WildValue, action_type: Optional[str]
|
||||
) -> Optional[Tuple[str, str]]:
|
||||
pass
|
||||
```
|
||||
|
||||
## Output
|
||||
@@ -515,6 +521,12 @@ def double(
|
||||
] # Hello
|
||||
):
|
||||
pass
|
||||
|
||||
|
||||
def process_board_action(
|
||||
payload: WildValue, action_type: Optional[str]
|
||||
) -> Optional[Tuple[str, str]]:
|
||||
pass
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user