mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-09 01:51:25 +08:00
Make it possible to access properties again
This time we catch all exceptions and try to avoid issues for the user. This is only happening when working with an Interpreter. I don't feel this is necessary otherwise. See #1299
This commit is contained in:
@@ -436,6 +436,7 @@ class Interpreter(Script):
|
||||
>>> print(script.completions()[0].name)
|
||||
upper
|
||||
"""
|
||||
_allow_descriptor_getattr_default = True
|
||||
|
||||
def __init__(self, source, namespaces, **kwds):
|
||||
"""
|
||||
@@ -466,6 +467,7 @@ class Interpreter(Script):
|
||||
super(Interpreter, self).__init__(source, environment=environment,
|
||||
_project=Project(os.getcwd()), **kwds)
|
||||
self.namespaces = namespaces
|
||||
self._evaluator.allow_descriptor_getattr = self._allow_descriptor_getattr_default
|
||||
|
||||
def _get_module(self):
|
||||
return interpreter.MixedModuleContext(
|
||||
|
||||
Reference in New Issue
Block a user