forked from VimPlug/jedi
Merge pull request #467 from phillipberndt/master
Alter jedi.Interpreter() namespace argument default from [] to [{}]
This commit is contained in:
@@ -26,5 +26,6 @@ Jorgen Schaefer (@jorgenschaefer) <contact@jorgenschaefer.de>
|
|||||||
Fredrik Bergroth (@fbergroth)
|
Fredrik Bergroth (@fbergroth)
|
||||||
Mathias Fußenegger (@mfussenegger)
|
Mathias Fußenegger (@mfussenegger)
|
||||||
Syohei Yoshida (@syohex) <syohex@gmail.com>
|
Syohei Yoshida (@syohex) <syohex@gmail.com>
|
||||||
|
Phillip Berndt (@phillipberndt) <phillip.berndt@gmail.com>
|
||||||
|
|
||||||
Note: (@user) means a github user name.
|
Note: (@user) means a github user name.
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ class Interpreter(Script):
|
|||||||
upper
|
upper
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, source, namespaces=[], **kwds):
|
def __init__(self, source, namespaces, **kwds):
|
||||||
"""
|
"""
|
||||||
Parse `source` and mixin interpreted Python objects from `namespaces`.
|
Parse `source` and mixin interpreted Python objects from `namespaces`.
|
||||||
|
|
||||||
@@ -635,6 +635,10 @@ class Interpreter(Script):
|
|||||||
If `line` and `column` are None, they are assumed be at the end of
|
If `line` and `column` are None, they are assumed be at the end of
|
||||||
`source`.
|
`source`.
|
||||||
"""
|
"""
|
||||||
|
if type(namespaces) is not list or len(namespaces) == 0 or \
|
||||||
|
any([type(x) is not dict for x in namespaces]):
|
||||||
|
raise TypeError("namespaces must be a non-empty list of dict")
|
||||||
|
|
||||||
super(Interpreter, self).__init__(source, **kwds)
|
super(Interpreter, self).__init__(source, **kwds)
|
||||||
self.namespaces = namespaces
|
self.namespaces = namespaces
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user