Remove _create_class_filter, it was unused

This commit is contained in:
Dave Halter
2019-05-19 14:05:23 +02:00
parent cbd16e6d6b
commit 05a3d7a3bc
2 changed files with 5 additions and 23 deletions

View File

@@ -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')

View File

@@ -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,