mirror of
https://github.com/davidhalter/jedi.git
synced 2026-02-25 07:27:12 +08:00
use Ellipsis instead of ..., for python 2.7 compatibility
This commit is contained in:
@@ -36,7 +36,7 @@ def factory(typing_name, indextypes):
|
|||||||
|
|
||||||
class Tuple(Sequence, tuple):
|
class Tuple(Sequence, tuple):
|
||||||
def __getitem__(self, index):
|
def __getitem__(self, index):
|
||||||
if indextypes[1] == ...:
|
if indextypes[1] == Ellipsis:
|
||||||
# https://www.python.org/dev/peps/pep-0484/#the-typing-module
|
# https://www.python.org/dev/peps/pep-0484/#the-typing-module
|
||||||
# Tuple[int, ...] means a tuple of ints of indetermined length
|
# Tuple[int, ...] means a tuple of ints of indetermined length
|
||||||
return indextypes[0]()
|
return indextypes[0]()
|
||||||
|
|||||||
Reference in New Issue
Block a user