mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 06:24:27 +08:00
remove unlogical operation catching
This commit is contained in:
@@ -447,11 +447,9 @@ class Execution(Executable):
|
|||||||
elif isinstance(self.base, Generator):
|
elif isinstance(self.base, Generator):
|
||||||
return self.base.iter_content()
|
return self.base.iter_content()
|
||||||
else:
|
else:
|
||||||
# Don't do this with exceptions, as usual, because some deeper
|
|
||||||
# exceptions could be catched - and I wouldn't know what happened.
|
|
||||||
try:
|
try:
|
||||||
self.base.returns
|
self.base.returns # Test if it is a function
|
||||||
except (AttributeError, DecoratorNotFound):
|
except AttributeError:
|
||||||
if hasattr(self.base, 'execute_subscope_by_name'):
|
if hasattr(self.base, 'execute_subscope_by_name'):
|
||||||
try:
|
try:
|
||||||
stmts = self.base.execute_subscope_by_name('__call__',
|
stmts = self.base.execute_subscope_by_name('__call__',
|
||||||
|
|||||||
Reference in New Issue
Block a user