forked from VimPlug/jedi
Remove compatibility for zip_longest
This commit is contained in:
@@ -211,12 +211,6 @@ def literal_eval(string):
|
||||
return ast.literal_eval(string)
|
||||
|
||||
|
||||
try:
|
||||
from itertools import zip_longest
|
||||
except ImportError:
|
||||
from itertools import izip_longest as zip_longest # Python 2 # noqa: F401
|
||||
|
||||
|
||||
def utf8_repr(func):
|
||||
"""
|
||||
``__repr__`` methods in Python 2 don't allow unicode objects to be
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import re
|
||||
from itertools import zip_longest
|
||||
|
||||
from parso.python import tree
|
||||
|
||||
from jedi._compatibility import zip_longest
|
||||
from jedi import debug
|
||||
from jedi.inference.utils import PushBackIterator
|
||||
from jedi.inference import analysis
|
||||
@@ -189,8 +189,6 @@ class TreeArguments(AbstractArguments):
|
||||
iterators = [_iterate_star_args(self.context, a, el, funcdef)
|
||||
for a in arrays]
|
||||
for values in list(zip_longest(*iterators)):
|
||||
# TODO zip_longest yields None, that means this would raise
|
||||
# an exception?
|
||||
yield None, get_merged_lazy_value(
|
||||
[v for v in values if v is not None]
|
||||
)
|
||||
|
||||
@@ -8,10 +8,12 @@ just one.
|
||||
"""
|
||||
from functools import reduce
|
||||
from operator import add
|
||||
from itertools import zip_longest
|
||||
|
||||
from parso.python.tree import Name
|
||||
|
||||
from jedi import debug
|
||||
from jedi._compatibility import zip_longest, unicode
|
||||
from jedi._compatibility import unicode
|
||||
from jedi.parser_utils import clean_scope_docstring
|
||||
from jedi.inference.helpers import SimpleGetItemNotFound
|
||||
from jedi.inference.utils import safe_property
|
||||
|
||||
Reference in New Issue
Block a user