mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-08 06:44:46 +08:00
add test to check instanciated subclasses
This commit is contained in:
@@ -198,3 +198,27 @@ from typing import Union as U
|
|||||||
def union4(x: U[int, str]):
|
def union4(x: U[int, str]):
|
||||||
#? int() str()
|
#? int() str()
|
||||||
x
|
x
|
||||||
|
|
||||||
|
class TestDict(typing.Dict[str, int]):
|
||||||
|
def setdud(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def testdict(x: TestDict):
|
||||||
|
#? ["setdud", "setdefault"]
|
||||||
|
x.setd
|
||||||
|
for key in x.keys():
|
||||||
|
#? str()
|
||||||
|
key
|
||||||
|
for value in x.values():
|
||||||
|
#? int()
|
||||||
|
value
|
||||||
|
|
||||||
|
x = TestDict()
|
||||||
|
#? ["setdud", "setdefault"]
|
||||||
|
x.setd
|
||||||
|
for key in x.keys():
|
||||||
|
#? str()
|
||||||
|
key
|
||||||
|
for value in x.values():
|
||||||
|
#? int()
|
||||||
|
value
|
||||||
|
|||||||
Reference in New Issue
Block a user