1
0
forked from VimPlug/jedi

remove useless is_empty function

This commit is contained in:
David Halter
2013-08-18 00:06:54 +04:30
parent a6b6b6cbe8
commit 6d9d07f873

View File

@@ -266,7 +266,7 @@ class Scope(Simple, IsScope):
:return: True if there are no subscopes, imports and statements.
:rtype: bool
"""
return not (self.imports or self.subscopes or self.statements)
return not (self.imports or self.subscopes or self.statements or self.returns)
@Python3Method
def get_statement_for_position(self, pos, include_imports=False):
@@ -479,9 +479,6 @@ class Function(Scope):
string += 'pass\n'
return string
def is_empty(self):
return super(Function, self).is_empty() and not self.returns
def get_set_vars(self):
n = super(Function, self).get_set_vars()
for p in self.params: