mirror of
https://github.com/davidhalter/jedi.git
synced 2026-09-18 18:43:13 +08:00
Fix some filter issues
This commit is contained in:
@@ -422,6 +422,9 @@ class InstanceClassFilter(filters.AbstractFilter):
|
|||||||
def _convert(self, names):
|
def _convert(self, names):
|
||||||
return [LazyInstanceClassName(self._instance, self._class_context, n) for n in names]
|
return [LazyInstanceClassName(self._instance, self._class_context, n) for n in names]
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return '<%s for %s>' % (self.__class__.__name__, self._class_context)
|
||||||
|
|
||||||
|
|
||||||
class SelfAttributeFilter(ClassFilter):
|
class SelfAttributeFilter(ClassFilter):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -53,7 +53,14 @@ class _BaseTypingContext(Context):
|
|||||||
|
|
||||||
def get_filters(self, *args, **kwargs):
|
def get_filters(self, *args, **kwargs):
|
||||||
# TODO this is obviously wrong.
|
# TODO this is obviously wrong.
|
||||||
return iter([])
|
class EmptyFilter():
|
||||||
|
def get(self, name):
|
||||||
|
return []
|
||||||
|
|
||||||
|
def values(self):
|
||||||
|
return []
|
||||||
|
|
||||||
|
yield EmptyFilter()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user