Skip to content

Commit

Permalink
remove unused returnValue (#819)
Browse files Browse the repository at this point in the history
last referenced in 2246217
  • Loading branch information
asottile authored Oct 3, 2024
1 parent ac563ed commit d9e32c4
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pyflakes/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ def __init__(self):
super().__init__()
# Simplify: manage the special locals as globals
self.globals = self.alwaysUsed.copy()
self.returnValue = None # First non-empty return

def unused_assignments(self):
"""
Expand Down Expand Up @@ -1888,12 +1887,6 @@ def RETURN(self, node):
self.report(messages.ReturnOutsideFunction, node)
return

if (
node.value and
hasattr(self.scope, 'returnValue') and
not self.scope.returnValue
):
self.scope.returnValue = node.value
self.handleNode(node.value, node)

def YIELD(self, node):
Expand Down

0 comments on commit d9e32c4

Please sign in to comment.