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