File tree Expand file tree Collapse file tree 3 files changed +3
-17
lines changed Expand file tree Collapse file tree 3 files changed +3
-17
lines changed Original file line number Diff line number Diff line change 23
23
PY35_PLUS = sys .version_info >= (3 , 5 ) # Python 3.5 and above
24
24
PY36_PLUS = sys .version_info >= (3 , 6 ) # Python 3.6 and above
25
25
PY38_PLUS = sys .version_info >= (3 , 8 )
26
- try :
27
- sys .pypy_version_info
28
- PYPY = True
29
- except AttributeError :
30
- PYPY = False
26
+ PYPY = hasattr (sys , 'pypy_version_info' )
31
27
32
28
builtin_vars = dir (__import__ ('__builtin__' if PY2 else 'builtins' ))
33
29
Original file line number Diff line number Diff line change 9
9
import subprocess
10
10
import tempfile
11
11
12
+ from pyflakes .checker import PYPY
12
13
from pyflakes .messages import UnusedImport
13
14
from pyflakes .reporter import Reporter
14
15
from pyflakes .api import (
25
26
from io import StringIO
26
27
unichr = chr
27
28
28
- try :
29
- sys .pypy_version_info
30
- PYPY = True
31
- except AttributeError :
32
- PYPY = False
33
-
34
29
ERROR_HAS_COL_NUM = ERROR_HAS_LAST_LINE = sys .version_info >= (3 , 2 ) or PYPY
35
30
36
31
Original file line number Diff line number Diff line change 3
3
4
4
from pyflakes import messages as m
5
5
from pyflakes .checker import (
6
+ PYPY ,
6
7
DoctestScope ,
7
8
FunctionScope ,
8
9
ModuleScope ,
12
13
from pyflakes .test .test_undefined_names import Test as TestUndefinedNames
13
14
from pyflakes .test .harness import TestCase , skip
14
15
15
- try :
16
- sys .pypy_version_info
17
- PYPY = True
18
- except AttributeError :
19
- PYPY = False
20
-
21
16
22
17
class _DoctestMixin (object ):
23
18
You can’t perform that action at this time.
0 commit comments