mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 05:54:25 +08:00
remove debug changes
This commit is contained in:
@@ -32,8 +32,8 @@ def filter_name(filters, name_or_str):
|
||||
"""
|
||||
string_name = name_or_str.value if isinstance(name_or_str, Name) else name_or_str
|
||||
names = []
|
||||
for filter_ in filters:
|
||||
names = filter_.get(string_name)
|
||||
for filter in filters:
|
||||
names = filter.get(string_name)
|
||||
if names:
|
||||
break
|
||||
|
||||
|
||||
@@ -495,9 +495,7 @@ class SelfName(TreeNameDefinition):
|
||||
|
||||
@property
|
||||
def parent_context(self):
|
||||
_instance = self._instance
|
||||
_context = _instance.create_instance_context(self.class_context, self.tree_name)
|
||||
return _context
|
||||
return self._instance.create_instance_context(self.class_context, self.tree_name)
|
||||
|
||||
def get_defining_qualified_value(self):
|
||||
return self._instance
|
||||
@@ -507,9 +505,9 @@ class SelfName(TreeNameDefinition):
|
||||
if stmt is not None:
|
||||
if stmt.children[1].type == "annassign":
|
||||
from jedi.inference.gradual.annotation import infer_annotation
|
||||
_parent_context = self.parent_context
|
||||
_infer = infer_annotation(_parent_context, stmt.children[1].children[1])
|
||||
values = _infer.execute_annotation()
|
||||
values = infer_annotation(
|
||||
self.parent_context, stmt.children[1].children[1]
|
||||
).execute_annotation()
|
||||
if values:
|
||||
return values
|
||||
return super().infer()
|
||||
|
||||
Reference in New Issue
Block a user