mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
Very small refactoring
This commit is contained in:
@@ -41,8 +41,7 @@ def _stub_to_python_context_set(stub_context, ignore_compiled=False):
|
||||
|
||||
def _infer_from_stub(stub_module, qualified_names, ignore_compiled):
|
||||
from jedi.evaluate.compiled.mixed import MixedObject
|
||||
assert isinstance(stub_module, StubModuleContext) or \
|
||||
isinstance(stub_module, MixedObject), stub_module
|
||||
assert isinstance(stub_module, (StubModuleContext, MixedObject)), stub_module
|
||||
non_stubs = stub_module.non_stub_context_set
|
||||
if ignore_compiled:
|
||||
non_stubs = non_stubs.filter(lambda c: not c.is_compiled())
|
||||
|
||||
@@ -444,4 +444,3 @@ def test__wrapped__():
|
||||
def test_core_module_completes(module_name):
|
||||
module = import_module(module_name)
|
||||
assert jedi.Interpreter(module_name + '.\n', [locals()]).completions()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user