pylint #3184 PyLint crashes when encountering "return outside function" [resolved]
Marteen reported : If I run PyLint on the following program: return It crashes like this: Traceback (most recent call last): File "/usr/bin/pylint", line 4, in ? lint.Run(sys.argv[1:]) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 847, in __init__ linter.check(args) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 481, in check self.check_file(filepath, modname, checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 495, in check_file astng = self._check_file(filepath, modname, checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 519, in _check_file self.check_astng_module(astng, checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 577, in check_astng_module self.astng_events(astng, [checker for checker in checkers File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 594, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 594, in astng_events self.astng_events(child, checkers, _reversed_checkers) File "/usr/lib/python2.4/site-packages/pylint/lint.py", line 591, in astng_events checker.visit(astng) File "/usr/lib/python2.4/site-packages/logilab/astng/utils.py", line 85, in visit method(node) File "/usr/lib/python2.4/site-packages/pylint/checkers/base.py", line 392, in visit_return self._returns[-1].append(node) IndexError: list index out of range | |
priority | normal |
---|---|
type | bug |
done in | 0.13.0 |
load | 0.250 |
load left | 0.000 |
closed by | <not specified> |