Make a method public

This commit is contained in:
Dave Halter
2020-03-10 09:35:03 +01:00
parent bedf3bff0e
commit 33c61b8708
2 changed files with 6 additions and 6 deletions

View File

@@ -87,8 +87,8 @@ def _try_stub_to_python_names(names, prefer_stub_to_compiled=False):
def _load_stub_module(module):
if module.is_stub():
return module
from jedi.inference.gradual.typeshed import _try_to_load_stub_cached
return _try_to_load_stub_cached(
from jedi.inference.gradual.typeshed import try_to_load_stub_cached
return try_to_load_stub_cached(
module.inference_state,
import_names=module.string_names,
python_value_set=ValueSet([module]),

View File

@@ -120,7 +120,7 @@ def import_module_decorator(func):
if not prefer_stubs:
return python_value_set
stub = _try_to_load_stub_cached(inference_state, import_names, python_value_set,
stub = try_to_load_stub_cached(inference_state, import_names, python_value_set,
parent_module_value, sys_path)
if stub is not None:
return ValueSet([stub])
@@ -129,7 +129,7 @@ def import_module_decorator(func):
return wrapper
def _try_to_load_stub_cached(inference_state, import_names, *args, **kwargs):
def try_to_load_stub_cached(inference_state, import_names, *args, **kwargs):
try:
return inference_state.stub_module_cache[import_names]
except KeyError:
@@ -153,7 +153,7 @@ def _try_to_load_stub(inference_state, import_names, python_value_set,
"""
if parent_module_value is None and len(import_names) > 1:
try:
parent_module_value = _try_to_load_stub_cached(
parent_module_value = try_to_load_stub_cached(
inference_state, import_names[:-1], NO_VALUES,
parent_module_value=None, sys_path=sys_path)
except KeyError: