You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Small cleanup/code optimization
This commit is contained in:
@@ -774,8 +774,7 @@ class SourceWalker(GenericASTTraversal, object):
|
|||||||
|
|
||||||
def is_return_none(self, node):
|
def is_return_none(self, node):
|
||||||
# Is there a better way?
|
# Is there a better way?
|
||||||
ret = (node in ('return_stmt', 'return_if_stmt')
|
ret = (node[0] == 'ret_expr'
|
||||||
and node[0] == 'ret_expr'
|
|
||||||
and node[0][0] == 'expr'
|
and node[0][0] == 'expr'
|
||||||
and node[0][0][0] == 'LOAD_CONST'
|
and node[0][0][0] == 'LOAD_CONST'
|
||||||
and node[0][0][0].pattr is None)
|
and node[0][0][0].pattr is None)
|
||||||
|
Reference in New Issue
Block a user