mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-19 23:09:43 +08:00
extension for #61
This commit is contained in:
@@ -19,6 +19,10 @@ class BaseOutput(object):
|
|||||||
'_io': 'io'
|
'_io': 'io'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_tuple_mapping = {
|
||||||
|
('argparse', '_ActionsContainer'): 'argparse._ActionsContainer'
|
||||||
|
}
|
||||||
|
|
||||||
def __init__(self, definition, start_pos):
|
def __init__(self, definition, start_pos):
|
||||||
self.start_pos = start_pos
|
self.start_pos = start_pos
|
||||||
self.definition = definition
|
self.definition = definition
|
||||||
@@ -91,6 +95,10 @@ class BaseOutput(object):
|
|||||||
path[0] = self._mapping[path[0]]
|
path[0] = self._mapping[path[0]]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
pass
|
pass
|
||||||
|
for key, repl in self._tuple_mapping.items():
|
||||||
|
if tuple(path[:len(key)]) == key:
|
||||||
|
path = [repl] + path[len(key)]
|
||||||
|
|
||||||
return '.'.join(path)
|
return '.'.join(path)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user