mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-28 07:56:51 +08:00
Make sure that the definition order in stubs are ignored
This commit is contained in:
@@ -51,6 +51,16 @@ class StubModuleValue(ModuleValue):
|
||||
for f in filters:
|
||||
yield f
|
||||
|
||||
def _as_context(self):
|
||||
return StubModuleContext(self)
|
||||
|
||||
|
||||
class StubModuleContext(ModuleContext):
|
||||
def get_filters(self, until_position=None, origin_scope=None):
|
||||
# Make sure to ignore the position, because positions are not relevant
|
||||
# for stubs.
|
||||
return super(StubModuleContext, self).get_filters(origin_scope=origin_scope)
|
||||
|
||||
|
||||
class TypingModuleWrapper(StubModuleValue):
|
||||
def get_filters(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user