mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-06 14:04:26 +08:00
Fix namedtuple issues that were uncovered by the 'self' changes
This commit is contained in:
@@ -84,7 +84,7 @@ class {typename}(tuple):
|
||||
# These methods were added by Jedi.
|
||||
# __new__ doesn't really work with Jedi. So adding this to nametuples seems
|
||||
# like the easiest way.
|
||||
def __init__(_cls, {arg_list}):
|
||||
def __init__(self, {arg_list}):
|
||||
'A helper function for namedtuple.'
|
||||
self.__iterable = ({arg_list})
|
||||
|
||||
|
||||
@@ -60,8 +60,7 @@ def test_nested_namedtuples(Script):
|
||||
Dataset = collections.namedtuple('Dataset', ['data'])
|
||||
Datasets = collections.namedtuple('Datasets', ['train'])
|
||||
train_x = Datasets(train=Dataset('data_value'))
|
||||
train_x.train.'''
|
||||
))
|
||||
train_x.train.'''))
|
||||
assert 'data' in [c.name for c in s.complete()]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user