mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-19 00:01:47 +08:00
add test to check instanciated subclasses
This commit is contained in:
1 parent
409ee5568a
commit
1b787e2a11
1 file changed
+24
@@ -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