diff options
author | Sylvain <syt@logilab.fr> | 2006-12-05 10:29:06 +0100 |
---|---|---|
committer | Sylvain <syt@logilab.fr> | 2006-12-05 10:29:06 +0100 |
commit | ddd403c6e5fed8aad0648b9205c41f384b49a808 (patch) | |
tree | 2ef1ef17ac981d46d080585bb53fc382c3e13945 /checkers/design_analysis.py | |
parent | 9c73bcc109fcf2f638d51dd5c3f6f66a8ea27cce (diff) | |
download | pylint-ddd403c6e5fed8aad0648b9205c41f384b49a808.tar.gz |
see changelog
Diffstat (limited to 'checkers/design_analysis.py')
-rw-r--r-- | checkers/design_analysis.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/checkers/design_analysis.py b/checkers/design_analysis.py index 5c43acc..21b4b4a 100644 --- a/checkers/design_analysis.py +++ b/checkers/design_analysis.py @@ -270,10 +270,14 @@ class MisdesignChecker(BaseChecker): def visit_return(self, _): """count number of returns/yields""" + if not self._returns: + return # return outside function, reported by the base checker self._returns[-1] += 1 def visit_yield(self, _): """count number of returns/yields""" + if not self._returns: + return # yield outside function, reported by the base checker self._returns[-1] += 1 def visit_default(self, node): |