mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
Remove _create_class_filter, it was unused
This commit is contained in:
@@ -172,13 +172,6 @@ class ClassMixin(FunctionAndClassMixin):
|
||||
mro.append(cls_new)
|
||||
yield cls_new
|
||||
|
||||
def _create_class_filter(self, cls, origin_scope, is_instance):
|
||||
return ClassFilter(
|
||||
self.evaluator, self, node_context=cls,
|
||||
origin_scope=origin_scope,
|
||||
is_instance=is_instance
|
||||
)
|
||||
|
||||
def get_filters(self, search_global=False, until_position=None,
|
||||
origin_scope=None, is_instance=False):
|
||||
if search_global:
|
||||
@@ -194,7 +187,11 @@ class ClassMixin(FunctionAndClassMixin):
|
||||
for filter in cls.get_filters(is_instance=is_instance):
|
||||
yield filter
|
||||
else:
|
||||
yield self._create_class_filter(cls, origin_scope, is_instance)
|
||||
yield ClassFilter(
|
||||
self.evaluator, self, node_context=cls,
|
||||
origin_scope=origin_scope,
|
||||
is_instance=is_instance
|
||||
)
|
||||
if not is_instance:
|
||||
from jedi.evaluate.compiled import builtin_from_name
|
||||
type_ = builtin_from_name(self.evaluator, u'type')
|
||||
|
||||
@@ -510,21 +510,6 @@ class AbstractAnnotatedClass(ClassMixin, ContextWrapper):
|
||||
def get_type_var_filter(self):
|
||||
return TypeVarFilter(self.get_given_types(), self.list_type_vars())
|
||||
|
||||
def _create_class_filter(self, cls, origin_scope, is_instance):
|
||||
filter_ = super(AbstractAnnotatedClass, self)._create_class_filter(
|
||||
cls, origin_scope, is_instance
|
||||
)
|
||||
return filter_
|
||||
# XXX
|
||||
return cls.stub_context.get_stub_filter(
|
||||
# Take the first filter, which is here to filter module contents
|
||||
# and wrap it.
|
||||
self.parent_context,
|
||||
[filter_],
|
||||
search_global=False,
|
||||
origin_scope=origin_scope,
|
||||
)
|
||||
|
||||
def get_filters(self, search_global=False, *args, **kwargs):
|
||||
filters = super(AbstractAnnotatedClass, self).get_filters(
|
||||
search_global,
|
||||
|
||||
Reference in New Issue
Block a user