Add Regression test for #5605, where formatting x[:,] failed. (#5759)

#5605 has been fixed, i added the failing example from the issue as a
regression test.

Closes #5605
This commit is contained in:
konsti
2023-07-14 11:55:05 +02:00
committed by GitHub
parent a961f75e13
commit fb46579d30
2 changed files with 9 additions and 0 deletions

View File

@@ -80,3 +80,6 @@ e200 = "e"[a() :: ]
e201 = "e"[a() :: 1]
e202 = "e"[a() :: a()]
e210 = "e"[a() : 1 :]
# Regression test for https://github.com/astral-sh/ruff/issues/5605
f = "f"[:,]

View File

@@ -86,6 +86,9 @@ e200 = "e"[a() :: ]
e201 = "e"[a() :: 1]
e202 = "e"[a() :: a()]
e210 = "e"[a() : 1 :]
# Regression test for https://github.com/astral-sh/ruff/issues/5605
f = "f"[:,]
```
## Output
@@ -170,6 +173,9 @@ e200 = "e"[a() : :]
e201 = "e"[a() :: 1]
e202 = "e"[a() :: a()]
e210 = "e"[a() : 1 :]
# Regression test for https://github.com/astral-sh/ruff/issues/5605
f = "f"[:,]
```