Remove is_py3 and is_py35

This commit is contained in:
Dave Halter
2020-07-02 02:22:09 +02:00
parent 17343bb57c
commit 0cd6a8f5cc
5 changed files with 15 additions and 38 deletions

View File

@@ -114,7 +114,7 @@ import pytest
import jedi
from jedi import debug
from jedi._compatibility import unicode, is_py3
from jedi._compatibility import unicode
from jedi.api.classes import Name
from jedi.api.completion import get_user_context
from jedi import parser_utils
@@ -401,12 +401,8 @@ def collect_dir_tests(base_dir, test_files, check_thirdparty=False):
path = os.path.join(base_dir, f_name)
if is_py3:
with open(path, encoding='utf-8', newline='') as f:
source = f.read()
else:
with open(path) as f:
source = unicode(f.read(), 'UTF-8')
with open(path, encoding='utf-8', newline='') as f:
source = f.read()
for case in collect_file_tests(path, StringIO(source),
lines_to_execute):