forked from VimPlug/jedi
Introduce some stricter typing
This commit is contained in:
@@ -38,7 +38,7 @@ py__doc__() Returns the docstring for a value.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List, Optional, Tuple
|
||||
from typing import List, Optional, Tuple, TYPE_CHECKING, Any
|
||||
|
||||
from jedi import debug
|
||||
from jedi.parser_utils import get_cached_parent_scope, expr_is_dotted, \
|
||||
@@ -61,6 +61,9 @@ from inspect import Parameter
|
||||
from jedi.inference.names import BaseTreeParamName
|
||||
from jedi.inference.signature import AbstractSignature
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from jedi.inference import InferenceState
|
||||
|
||||
|
||||
class ClassName(TreeNameDefinition):
|
||||
def __init__(self, class_value, tree_name, name_context, apply_decorators):
|
||||
@@ -197,6 +200,15 @@ def get_dataclass_param_names(cls) -> List[DataclassParamName]:
|
||||
|
||||
|
||||
class ClassMixin:
|
||||
tree_node: Any
|
||||
parent_context: Any
|
||||
inference_state: InferenceState
|
||||
py__bases__: Any
|
||||
get_metaclasses: Any
|
||||
get_metaclass_filters: Any
|
||||
get_metaclass_signatures: Any
|
||||
list_type_vars: Any
|
||||
|
||||
def is_class(self):
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user