mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 22:14:27 +08:00
stub_only -> stub
This commit is contained in:
@@ -16,7 +16,7 @@ class _StubContextMixin(object):
|
|||||||
def is_stub(self):
|
def is_stub(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _get_stub_only_filters(self, **filter_kwargs):
|
def _get_stub_filters(self, **filter_kwargs):
|
||||||
return [StubFilter(
|
return [StubFilter(
|
||||||
self.evaluator,
|
self.evaluator,
|
||||||
context=self,
|
context=self,
|
||||||
@@ -26,12 +26,12 @@ class _StubContextMixin(object):
|
|||||||
def _get_base_filters(self, filters, search_global=False,
|
def _get_base_filters(self, filters, search_global=False,
|
||||||
until_position=None, origin_scope=None):
|
until_position=None, origin_scope=None):
|
||||||
next(filters) # Ignore the first filter and replace it with our own
|
next(filters) # Ignore the first filter and replace it with our own
|
||||||
stub_only_filters = self._get_stub_only_filters(
|
stub_filters = self._get_stub_filters(
|
||||||
search_global=search_global,
|
search_global=search_global,
|
||||||
until_position=until_position,
|
until_position=until_position,
|
||||||
origin_scope=origin_scope,
|
origin_scope=origin_scope,
|
||||||
)
|
)
|
||||||
for f in stub_only_filters:
|
for f in stub_filters:
|
||||||
yield f
|
yield f
|
||||||
|
|
||||||
for f in filters:
|
for f in filters:
|
||||||
@@ -49,8 +49,8 @@ class StubModuleContext(_StubContextMixin, ModuleContext):
|
|||||||
for context in self.non_stub_context_set:
|
for context in self.non_stub_context_set:
|
||||||
yield next(context.get_filters(search_global=False))
|
yield next(context.get_filters(search_global=False))
|
||||||
|
|
||||||
def _get_stub_only_filters(self, search_global, **filter_kwargs):
|
def _get_stub_filters(self, search_global, **filter_kwargs):
|
||||||
stub_filters = super(StubModuleContext, self)._get_stub_only_filters(
|
stub_filters = super(StubModuleContext, self)._get_stub_filters(
|
||||||
search_global=search_global, **filter_kwargs
|
search_global=search_global, **filter_kwargs
|
||||||
)
|
)
|
||||||
stub_filters += self.iter_star_filters(search_global=search_global)
|
stub_filters += self.iter_star_filters(search_global=search_global)
|
||||||
|
|||||||
@@ -515,7 +515,7 @@ class AbstractAnnotatedClass(ClassMixin, ContextWrapper):
|
|||||||
)
|
)
|
||||||
return filter_
|
return filter_
|
||||||
# XXX
|
# XXX
|
||||||
return cls.stub_context.get_stub_only_filter(
|
return cls.stub_context.get_stub_filter(
|
||||||
# Take the first filter, which is here to filter module contents
|
# Take the first filter, which is here to filter module contents
|
||||||
# and wrap it.
|
# and wrap it.
|
||||||
self.parent_context,
|
self.parent_context,
|
||||||
|
|||||||
Reference in New Issue
Block a user