forked from VimPlug/jedi
is_py3k -> is_py3
This commit is contained in:
@@ -7,7 +7,7 @@ mixing in Python code, the autocompletion should work much better for builtins.
|
||||
import os
|
||||
import inspect
|
||||
|
||||
from jedi._compatibility import is_py3k, builtins
|
||||
from jedi._compatibility import is_py3, builtins
|
||||
from jedi.parser import Parser
|
||||
from jedi.parser.representation import Class
|
||||
from jedi.evaluate.helpers import FakeName
|
||||
@@ -17,7 +17,7 @@ modules = {}
|
||||
|
||||
def _load_faked_module(module):
|
||||
module_name = module.__name__
|
||||
if module_name == '__builtin__' and not is_py3k:
|
||||
if module_name == '__builtin__' and not is_py3:
|
||||
module_name = 'builtins'
|
||||
|
||||
try:
|
||||
@@ -33,7 +33,7 @@ def _load_faked_module(module):
|
||||
module = Parser(source, module_name).module
|
||||
modules[module_name] = module
|
||||
|
||||
if module_name == 'builtins' and not is_py3k:
|
||||
if module_name == 'builtins' and not is_py3:
|
||||
# There are two implementations of `open` for either python 2/3.
|
||||
# -> Rename the python2 version (`look at fake/builtins.pym`).
|
||||
open_func = search_scope(module, 'open')
|
||||
|
||||
@@ -3,7 +3,7 @@ import itertools
|
||||
from jedi import common
|
||||
from jedi import debug
|
||||
from jedi import settings
|
||||
from jedi._compatibility import use_metaclass, is_py3k, unicode
|
||||
from jedi._compatibility import use_metaclass, is_py3, unicode
|
||||
from jedi.parser import representation as pr
|
||||
from jedi.evaluate import compiled
|
||||
from jedi.evaluate import helpers
|
||||
@@ -200,7 +200,7 @@ def get_iterator_types(inputs):
|
||||
result += gen.get_index_types()
|
||||
elif isinstance(gen, Instance):
|
||||
# __iter__ returned an instance.
|
||||
name = '__next__' if is_py3k else 'next'
|
||||
name = '__next__' if is_py3 else 'next'
|
||||
try:
|
||||
result += gen.execute_subscope_by_name(name)
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user