diff --git a/flake8_rst_docstrings.py b/flake8_rst_docstrings.py index ba4a7a1..2634bbe 100644 --- a/flake8_rst_docstrings.py +++ b/flake8_rst_docstrings.py @@ -171,12 +171,12 @@ def run(self): rst_fail_lint, "Failed to lint docstring: %s - %s" % (node.name, err), ) - self.errors.append((node.body[0].lineno, msg)) + yield 0, 0, msg, type(self) continue if rst_errors: start = node.body[0].lineno - len( - ast.get_docstring(node, clean=False).split("\n") + ast.get_docstring(node, clean=False).splitlines() ) for rst_error in rst_errors: