mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-23 00:27:05 +08:00
Fix all class issues.
This commit is contained in:
1 parent
cfc988b786
commit
14a8377817
5 files changed
+8
-5
No files matched your search
@@ -80,7 +80,7 @@ class AnonymousInstanceParamName(ParamName):
|
||||
if self.tree_name.parent.position_nr == 0:
|
||||
# This is a speed optimization, to return the self param (because
|
||||
# it's known). This only affects anonymous instances.
|
||||
return set([self.parent_context])
|
||||
return set([self.parent_context.instance])
|
||||
else:
|
||||
return self._get_param().infer()
|
||||
|
||||
@@ -137,7 +137,7 @@ class ParserTreeFilter(AbstractUsedNamesFilter):
|
||||
|
||||
def _filter(self, names):
|
||||
names = super(ParserTreeFilter, self)._filter(names)
|
||||
names = [n for n in names if n.is_definition()]
|
||||
names = [n for n in names if n.is_definition() and n.parent.type != 'trailer']
|
||||
names = [n for n in names if n.parent.get_parent_scope() == self._parser_scope]
|
||||
|
||||
return list(self._check_flows(names))
|
||||
|
||||
Reference in new issue
Block a user