AttributeError: 'ModuleScope' object has no attribute 'returnValue'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pyflakes |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Running the pyflakes checker on a code I get this:
File "/opt/local/
return check(codestr, filename, reporter)
File "/opt/local/
w = checker.
File "/opt/local/
self.
File "/opt/local/
self.
File "/opt/local/
handler(node)
File "/opt/local/
self.
File "/opt/local/
handler(node)
File "/opt/local/
if node.value and not self.scope.
AttributeError: 'ModuleScope' object has no attribute 'returnValue'
Unluckily I'm not able to check the code that raise the error (it's a 3rd party legacy code full of errors).
I skipped the issue changing the line 696 to:
if node.value and hasattr(self.scope, 'returnValue') and not self.scope.
Changed in pyflakes: | |
status: | Confirmed → Fix Committed |
Changed in pyflakes: | |
status: | Fix Committed → Fix Released |
I can reproduce this case with the following (invalid) snippet:
class Foo(object):
return
All versions of Python.