summaryrefslogtreecommitdiff
path: root/checkers
diff options
context:
space:
mode:
authorSylvain Thénault <sylvain.thenault@logilab.fr>2010-02-23 13:34:59 +0100
committerSylvain Thénault <sylvain.thenault@logilab.fr>2010-02-23 13:34:59 +0100
commit9686bf693764bdf9bb805afbbbe0ac71230b6cab (patch)
tree05fdd29deb1a24315b6708484c3ec1a4e3afd27d /checkers
parente8e8fd80f2787933494f67a9140c1710940e04ca (diff)
downloadpylint-git-9686bf693764bdf9bb805afbbbe0ac71230b6cab.tar.gz
patch for #5977. Yields do not increment the counter of returns.
* remove yields counting
Diffstat (limited to 'checkers')
-rw-r--r--checkers/design_analysis.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/checkers/design_analysis.py b/checkers/design_analysis.py
index cfc81c303..0deb6c796 100644
--- a/checkers/design_analysis.py
+++ b/checkers/design_analysis.py
@@ -287,17 +287,11 @@ class MisdesignChecker(BaseChecker):
args=(self._stmts, self.config.max_statements))
def visit_return(self, _):
- """count number of returns/yields"""
+ """count number of returns"""
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):
"""default visit method -> increments the statements counter if
necessary