Skip to content
This repository was archived by the owner on Feb 19, 2023. It is now read-only.

Commit 0bf640e

Browse files
committed
fix across py versions
1 parent 56e309c commit 0bf640e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas_dev_flaker/_plugins_tree/pytest_xfail.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import ast
2+
import sys
23
from typing import Iterator, Tuple
34

45
from pandas_dev_flaker._data_tree import State, register
@@ -19,7 +20,10 @@ def visit_FunctionDef(
1920
and isinstance(decorator.value, ast.Name)
2021
and decorator.value.id == "pytest"
2122
):
22-
yield node.lineno, node.col_offset, MSG
23+
if sys.version_info >= (3, 8): # pragma: no cover (<py38)
24+
yield node.lineno, node.col_offset, MSG
25+
else: # pragma: no cover (py38+)
26+
yield node.lineno + 1, node.col_offset, MSG
2327

2428

2529
@register(ast.ImportFrom)

0 commit comments

Comments
 (0)