summaryrefslogtreecommitdiff
path: root/checkers/design_analysis.py
diff options
context:
space:
mode:
authorSylvain <syt@logilab.fr>2006-12-05 10:29:06 +0100
committerSylvain <syt@logilab.fr>2006-12-05 10:29:06 +0100
commitddd403c6e5fed8aad0648b9205c41f384b49a808 (patch)
tree2ef1ef17ac981d46d080585bb53fc382c3e13945 /checkers/design_analysis.py
parent9c73bcc109fcf2f638d51dd5c3f6f66a8ea27cce (diff)
downloadpylint-ddd403c6e5fed8aad0648b9205c41f384b49a808.tar.gz
see changelog
Diffstat (limited to 'checkers/design_analysis.py')
-rw-r--r--checkers/design_analysis.py4
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):