mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
Avoid a few warnings
This commit is contained in:
@@ -328,9 +328,10 @@ def test_completion_params():
|
|||||||
|
|
||||||
script = jedi.Interpreter('foo', [locals()])
|
script = jedi.Interpreter('foo', [locals()])
|
||||||
c, = script.complete()
|
c, = script.complete()
|
||||||
assert [p.name for p in c.params] == ['a', 'b']
|
sig, = c.get_signatures()
|
||||||
assert c.params[0].infer() == []
|
assert [p.name for p in sig.params] == ['a', 'b']
|
||||||
t, = c.params[1].infer()
|
assert sig.params[0].infer() == []
|
||||||
|
t, = sig.params[1].infer()
|
||||||
assert t.name == 'int'
|
assert t.name == 'int'
|
||||||
|
|
||||||
|
|
||||||
@@ -342,7 +343,8 @@ def test_completion_param_annotations():
|
|||||||
exec_(code, locals())
|
exec_(code, locals())
|
||||||
script = jedi.Interpreter('foo', [locals()])
|
script = jedi.Interpreter('foo', [locals()])
|
||||||
c, = script.complete()
|
c, = script.complete()
|
||||||
a, b, c = c.params
|
sig, = c.get_signatures()
|
||||||
|
a, b, c = sig.params
|
||||||
assert a.infer() == []
|
assert a.infer() == []
|
||||||
assert [d.name for d in b.infer()] == ['str']
|
assert [d.name for d in b.infer()] == ['str']
|
||||||
assert {d.name for d in c.infer()} == {'int', 'float'}
|
assert {d.name for d in c.infer()} == {'int', 'float'}
|
||||||
|
|||||||
Reference in New Issue
Block a user