PY-72661 Literal completion inside nested parenthesis

GitOrigin-RevId: 14f18efcbaa520ac36ddd4892b774ed60a01cfdc
This commit is contained in:
Petr
2024-06-17 20:36:23 +00:00
committed by intellij-monorepo-bot
parent 3d3aefb69d
commit ee91d6a211
8 changed files with 61 additions and 21 deletions
@@ -0,0 +1,5 @@
from typing import Literal
item: Literal[Literal[Literal["0", 2], "acc"], "5", None]
item=(((<caret>)))
@@ -0,0 +1,8 @@
from typing import Literal
def f(x, y: Literal[Literal["abb"], "bac"]):
pass
f(1, ((("<caret>"))))
@@ -0,0 +1,8 @@
from typing import Literal
def f(x: Literal[Literal[Literal[1, "-1"], "foo"], "6", None]) -> None:
pass
f(x=((((<caret>)))))
@@ -0,0 +1,8 @@
from typing import Literal
class A:
def __getitem__(self, item: Literal[Literal[Literal["1", "2"], "foo"], "5", None]) -> str:
pass
A()[(((("<caret>"))))]