Skip to content
Snippets Groups Projects
Unverified Commit ac7c6d1a authored by Claudiu Popa's avatar Claudiu Popa
Browse files

Add check_messages guard where it was missing

parent 2a662962
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -349,6 +349,7 @@ class RefactoringChecker(checkers.BaseTokenChecker):
self._check_consistent_returns(node)
self._return_nodes[node.name] = []
 
@utils.check_messages('stop-iteration-return')
def visit_raise(self, node):
self._check_stop_iteration_inside_generator(node)
 
Loading
Loading
@@ -371,6 +372,7 @@ class RefactoringChecker(checkers.BaseTokenChecker):
stopiteration_qname = '{}.StopIteration'.format(utils.EXCEPTIONS_MODULE)
return any(_class.qname() == stopiteration_qname for _class in exc.mro())
 
@utils.check_messages('stop-iteration-return')
def visit_call(self, node):
self._check_raising_stopiteration_in_generator_next_call(node)
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment