mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Don't use get_function_slot_names in classes anymore
This commit is contained in:
@@ -182,22 +182,10 @@ class ClassMixin(object):
|
|||||||
def py__name__(self):
|
def py__name__(self):
|
||||||
return self.name.string_name
|
return self.name.string_name
|
||||||
|
|
||||||
def get_function_slot_names(self, name):
|
|
||||||
for filter in self.get_filters(search_global=False):
|
|
||||||
names = filter.get(name)
|
|
||||||
if names:
|
|
||||||
return names
|
|
||||||
return []
|
|
||||||
|
|
||||||
def get_param_names(self):
|
def get_param_names(self):
|
||||||
for name in self.get_function_slot_names(u'__init__'):
|
for context_ in self.py__getattribute__(u'__init__'):
|
||||||
for context_ in name.infer():
|
if context_.is_function():
|
||||||
try:
|
return list(context_.get_param_names())[1:]
|
||||||
method = context_.get_param_names
|
|
||||||
except AttributeError:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
return list(method())[1:]
|
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def py__mro__(self):
|
def py__mro__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user