diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2010-02-23 13:34:59 +0100 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2010-02-23 13:34:59 +0100 |
commit | 9686bf693764bdf9bb805afbbbe0ac71230b6cab (patch) | |
tree | 05fdd29deb1a24315b6708484c3ec1a4e3afd27d /checkers | |
parent | e8e8fd80f2787933494f67a9140c1710940e04ca (diff) | |
download | pylint-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.py | 8 |
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 |