Simplify get_parent_scope
This commit is contained in:
1 parent
33e5a3280a
commit
6b7ce590fa
3 files changed
+5
-6
No files matched your search
@@ -140,11 +140,11 @@ class Base(object):
|
||||
scope = scope.parent
|
||||
return scope
|
||||
|
||||
def get_parent_scope(self, include_current=True):
|
||||
def get_parent_scope(self):
|
||||
"""
|
||||
Returns the underlying scope.
|
||||
"""
|
||||
scope = self if include_current else self.parent
|
||||
scope = self.parent
|
||||
while scope.parent is not None:
|
||||
if scope.is_scope():
|
||||
break
|
||||
|
||||
Reference in new issue
Block a user