forked from VimPlug/jedi
Any -> AnyClass
This commit is contained in:
@@ -23,8 +23,8 @@ class _BoundTypeVarName(AbstractNameDefinition):
|
|||||||
def iter_():
|
def iter_():
|
||||||
for value in self._value_set:
|
for value in self._value_set:
|
||||||
# Replace any with the constraints if they are there.
|
# Replace any with the constraints if they are there.
|
||||||
from jedi.inference.gradual.typing import Any
|
from jedi.inference.gradual.typing import AnyClass
|
||||||
if isinstance(value, Any):
|
if isinstance(value, AnyClass):
|
||||||
for constraint in self._type_var.constraints:
|
for constraint in self._type_var.constraints:
|
||||||
yield constraint
|
yield constraint
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class TypingModuleName(NameWrapper):
|
|||||||
yield TypeVarClass.create_cached(
|
yield TypeVarClass.create_cached(
|
||||||
inference_state, self.parent_context, self.tree_name)
|
inference_state, self.parent_context, self.tree_name)
|
||||||
elif name == 'Any':
|
elif name == 'Any':
|
||||||
yield Any.create_cached(
|
yield AnyClass.create_cached(
|
||||||
inference_state, self.parent_context, self.tree_name)
|
inference_state, self.parent_context, self.tree_name)
|
||||||
elif name == 'TYPE_CHECKING':
|
elif name == 'TYPE_CHECKING':
|
||||||
# This is needed for e.g. imports that are only available for type
|
# This is needed for e.g. imports that are only available for type
|
||||||
@@ -362,7 +362,7 @@ class Protocol(BaseTypingInstance):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Any(BaseTypingValue):
|
class AnyClass(BaseTypingValue):
|
||||||
def execute_annotation(self):
|
def execute_annotation(self):
|
||||||
debug.warning('Used Any - returned no results')
|
debug.warning('Used Any - returned no results')
|
||||||
return NO_VALUES
|
return NO_VALUES
|
||||||
|
|||||||
Reference in New Issue
Block a user