Skip to content

Commit

Permalink
Fix namedtuple issues that were uncovered by the 'self' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhalter committed Dec 27, 2019
1 parent cc136a2 commit 3ec73f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jedi/plugins/stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __getnewargs__(self):
# 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})
Expand Down
3 changes: 1 addition & 2 deletions test/test_inference/test_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()]


Expand Down

0 comments on commit 3ec73f1

Please sign in to comment.