A first iteration for file path completions
This commit is contained in:
1 parent
9dd088f3db
commit
fd1e6afd07
8 files changed
+121
-20
No files matched your search
@@ -58,6 +58,23 @@ class AbstractNameDefinition(object):
|
||||
return self.parent_context.api_type
|
||||
|
||||
|
||||
class AbstractArbitraryName(AbstractNameDefinition):
|
||||
"""
|
||||
When you e.g. want to complete dicts keys, you probably want to complete
|
||||
string literals, which is not really a name, but for Jedi it works the same
|
||||
way
|
||||
"""
|
||||
is_context_name = False
|
||||
|
||||
def __init__(self, evaluator, string):
|
||||
self.evaluator = evaluator
|
||||
self.string_name = string
|
||||
self.parent_context = evaluator.builtins_module
|
||||
|
||||
def infer(self):
|
||||
return NO_CONTEXTS
|
||||
|
||||
|
||||
class AbstractTreeName(AbstractNameDefinition):
|
||||
def __init__(self, parent_context, tree_name):
|
||||
self.parent_context = parent_context
|
||||
|
||||
Reference in new issue
Block a user