forked from VimPlug/jedi
Upgrade typeshed to the latest commits
Also fixes some small Jedi issues with it (None interpretation in annoations mostly)
This commit is contained in:
@@ -264,6 +264,12 @@ class CompiledObject(Value):
|
||||
self.access_handle.execute_operation(other.access_handle, operator)
|
||||
)
|
||||
|
||||
def execute_annotation(self):
|
||||
if self.access_handle.get_repr() == 'None':
|
||||
# None as an annotation doesn't need to be executed.
|
||||
return ValueSet([self])
|
||||
return super().execute_annotation()
|
||||
|
||||
def negate(self):
|
||||
return create_from_access_path(self.inference_state, self.access_handle.negate())
|
||||
|
||||
|
||||
2
jedi/third_party/typeshed
vendored
2
jedi/third_party/typeshed
vendored
Submodule jedi/third_party/typeshed updated: 3319cadf85...ff92f09efb
@@ -44,7 +44,7 @@ def return_none() -> None:
|
||||
"""
|
||||
pass
|
||||
|
||||
#?
|
||||
#? None
|
||||
return_none()
|
||||
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ def union(p, q, r, s, t):
|
||||
r
|
||||
#? int() str() float() dict()
|
||||
s
|
||||
#? int()
|
||||
#? int() None
|
||||
t
|
||||
|
||||
def optional(p):
|
||||
|
||||
@@ -71,4 +71,4 @@ def test_param_kind_and_name(code, index, param_code, kind, Script, skip_python2
|
||||
|
||||
def test_staticmethod(Script):
|
||||
s, = Script('staticmethod(').call_signatures()
|
||||
assert s.to_string() == 'staticmethod(f: Callable)'
|
||||
assert s.to_string() == 'staticmethod(f: Callable[..., Any])'
|
||||
|
||||
@@ -27,13 +27,13 @@ def test_get_typeshed_directories():
|
||||
assert dirs == transform({'stdlib/2and3', 'stdlib/3', 'third_party/2and3', 'third_party/3'})
|
||||
|
||||
dirs = get_dirs(PythonVersionInfo(3, 5))
|
||||
assert dirs == transform({'stdlib/2and3', 'stdlib/3', 'stdlib/3.5',
|
||||
'third_party/2and3', 'third_party/3', 'third_party/3.5'})
|
||||
assert dirs == transform({'stdlib/2and3', 'stdlib/3',
|
||||
'third_party/2and3', 'third_party/3'})
|
||||
|
||||
dirs = get_dirs(PythonVersionInfo(3, 6))
|
||||
assert dirs == transform({'stdlib/2and3', 'stdlib/3', 'stdlib/3.5',
|
||||
assert dirs == transform({'stdlib/2and3', 'stdlib/3',
|
||||
'stdlib/3.6', 'third_party/2and3',
|
||||
'third_party/3', 'third_party/3.5', 'third_party/3.6'})
|
||||
'third_party/3', 'third_party/3.6'})
|
||||
|
||||
|
||||
def test_get_stub_files():
|
||||
|
||||
Reference in New Issue
Block a user