From d9e32c4cbdb569e66d5f63c9687b8a396796a44b Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Thu, 3 Oct 2024 16:54:44 -0400 Subject: [PATCH] remove unused returnValue (#819) last referenced in 2246217295dc8cb30ef4a7b9d8dc449ce32e603a --- pyflakes/checker.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pyflakes/checker.py b/pyflakes/checker.py index 2fe7f37a..fbc0ff83 100644 --- a/pyflakes/checker.py +++ b/pyflakes/checker.py @@ -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): """ @@ -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):