Skip to content

Commit a0ef506

Browse files
committed
Simplify version checks
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent 97a4c9d commit a0ef506

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

bpython/autocomplete.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
import os
3434
import re
3535
import rlcompleter
36-
import sys
3736
from six.moves import range, builtins
3837
from six import string_types, iteritems
3938

@@ -210,7 +209,7 @@ class FilenameCompletion(BaseCompletionType):
210209
def __init__(self, mode=SIMPLE):
211210
super(FilenameCompletion, self).__init__(False, mode)
212211

213-
if sys.version_info[:2] >= (3, 4):
212+
if py3:
214213
def safe_glob(self, pathname):
215214
return glob.iglob(glob.escape(pathname) + '*')
216215
else:

bpython/curtsiesfrontend/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
unicode = str
100100

101101

102-
if sys.version_info >= (3, 4):
102+
if py3:
103103
def is_main_thread():
104104
return threading.main_thread() == threading.current_thread()
105105
else:

bpython/importcompletion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from warnings import catch_warnings
3636
from six.moves import filter
3737

38-
if sys.version_info[0] == 3 and sys.version_info[1] >= 3:
38+
if py3:
3939
import importlib.machinery
4040
SUFFIXES = importlib.machinery.all_suffixes()
4141
else:

0 commit comments

Comments
 (0)