Skip to content

Commit c440cac

Browse files
committed
Fix coverage on PyPy
1 parent dc32fac commit c440cac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flake8_sphinx_links/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _check_docstring(self, node: Union[ast.ClassDef, ast.FunctionDef, ast.Module
207207

208208
if (
209209
sys.version_info < (3, 8) and platform.python_implementation() != "PyPy"
210-
): # pragma: no cover (PY38+)
210+
): # pragma: no cover (PY38+ or PyPy)
211211
doc_end_lineno = node.body[0].value.lineno # type: ignore
212212

213213
# Calculate the start line
@@ -220,7 +220,7 @@ def _check_docstring(self, node: Union[ast.ClassDef, ast.FunctionDef, ast.Module
220220

221221
doc_start_lineno += 1
222222

223-
else: # pragma: no cover (<PY38)
223+
else: # pragma: no cover (<PY38 and !PyPy)
224224
doc_start_lineno = node.body[0].value.lineno # type: ignore
225225

226226
for offset, line in enumerate(docstring.splitlines()):

0 commit comments

Comments
 (0)