File tree 2 files changed +9
-5
lines changed 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
"""
2
2
python version compatibility code
3
3
"""
4
+ import sys # isort:skip
5
+
6
+ if sys .version_info < (3 , 5 , 2 ):
7
+ from typing_extensions import TYPE_CHECKING
8
+ else :
9
+ from typing import TYPE_CHECKING
10
+
4
11
import functools
5
12
import inspect
6
13
import io
7
14
import os
8
15
import re
9
- import sys
10
16
from contextlib import contextmanager
11
17
from inspect import Parameter
12
18
from inspect import signature
28
34
from _pytest .outcomes import fail
29
35
from _pytest .outcomes import TEST_OUTCOME
30
36
31
- if sys .version_info < (3 , 5 , 2 ):
32
- from typing_extensions import TYPE_CHECKING
33
- else :
34
- from typing import TYPE_CHECKING
35
37
36
38
if TYPE_CHECKING :
37
39
from typing import Type # noqa: F401 (used in type string)
Original file line number Diff line number Diff line change @@ -182,6 +182,8 @@ markers =
182
182
[flake8]
183
183
max-line-length = 120
184
184
extend-ignore = E203
185
+ per-file-ignores =
186
+ src/_pytest/compat.py: E402
185
187
186
188
[isort]
187
189
; This config mimics what reorder-python-imports does.
You can’t perform that action at this time.
0 commit comments