1
0
forked from VimPlug/jedi

Merge branch 'dev' of github.com:davidhalter/jedi into dev

This commit is contained in:
David Halter
2012-11-26 11:42:26 +01:00
2 changed files with 16 additions and 4 deletions

View File

@@ -19,9 +19,11 @@ class BaseOutput(object):
'_io': 'io'
}
_tuple_mapping = {
('argparse', '_ActionsContainer'): 'argparse._ActionsContainer'
}
_tuple_mapping = dict((tuple(k.split('.')), v) for (k, v) in {
'argparse._ActionsContainer': 'argparse.ArgumentParser',
'_sre.SRE_Match': 're.MatchObject',
'_sre.SRE_Pattern': 're.RegexObject',
}.items())
def __init__(self, definition, start_pos):
self.start_pos = start_pos
@@ -97,7 +99,7 @@ class BaseOutput(object):
pass
for key, repl in self._tuple_mapping.items():
if tuple(path[:len(key)]) == key:
path = [repl] + path[len(key)]
path = [repl] + path[len(key):]
return '.'.join(path)