mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-17 23:54:12 +08:00
Fix most import related mypy errors
This commit is contained in:
@@ -2,6 +2,22 @@ from jedi.inference.compiled.value import CompiledValue, CompiledName, \
|
||||
CompiledValueFilter, CompiledValueName, create_from_access_path
|
||||
from jedi.inference.base_value import LazyValueWrapper
|
||||
|
||||
__all__ = (
|
||||
'CompiledValue',
|
||||
'CompiledName',
|
||||
'CompiledValueFilter',
|
||||
'CompiledValueName',
|
||||
'create_from_access_path',
|
||||
|
||||
'LazyValueWrapper',
|
||||
|
||||
'builtin_from_name',
|
||||
'ExactValue',
|
||||
'create_simple_object',
|
||||
'get_string_value_set',
|
||||
'load_module',
|
||||
)
|
||||
|
||||
|
||||
def builtin_from_name(inference_state, string):
|
||||
typing_builtins_module = inference_state.builtins_module
|
||||
|
||||
@@ -50,7 +50,7 @@ def _get_numpy_doc_string_cls():
|
||||
global _numpy_doc_string_cache
|
||||
if isinstance(_numpy_doc_string_cache, (ImportError, SyntaxError)):
|
||||
raise _numpy_doc_string_cache
|
||||
from numpydoc.docscrape import NumpyDocString
|
||||
from numpydoc.docscrape import NumpyDocString # type: ignore[import]
|
||||
_numpy_doc_string_cache = NumpyDocString
|
||||
return _numpy_doc_string_cache
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ from parso import python_bytes_to_unicode
|
||||
|
||||
from jedi.debug import dbg
|
||||
from jedi.file_io import KnownContentFileIO
|
||||
from jedi.inference.imports import SubModuleName, load_module_from_path
|
||||
from jedi.inference.names import SubModuleName
|
||||
from jedi.inference.imports import load_module_from_path
|
||||
from jedi.inference.filters import ParserTreeFilter
|
||||
from jedi.inference.gradual.conversion import convert_names
|
||||
|
||||
|
||||
@@ -4,3 +4,18 @@ from jedi.inference.value.function import FunctionValue, \
|
||||
MethodValue
|
||||
from jedi.inference.value.instance import AnonymousInstance, BoundMethod, \
|
||||
CompiledInstance, AbstractInstanceValue, TreeInstance
|
||||
|
||||
__all__ = (
|
||||
'ModuleValue',
|
||||
|
||||
'ClassValue',
|
||||
|
||||
'FunctionValue',
|
||||
'MethodValue',
|
||||
|
||||
'AnonymousInstance',
|
||||
'BoundMethod',
|
||||
'CompiledInstance',
|
||||
'AbstractInstanceValue',
|
||||
'TreeInstance',
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from abc import abstractproperty
|
||||
|
||||
from parso.python.tree import search_ancestor
|
||||
from parso.tree import search_ancestor
|
||||
|
||||
from jedi import debug
|
||||
from jedi import settings
|
||||
|
||||
Reference in New Issue
Block a user