diff --git a/jedi/plugins/stdlib.py b/jedi/plugins/stdlib.py index 90c8d247f..4c429a2c1 100644 --- a/jedi/plugins/stdlib.py +++ b/jedi/plugins/stdlib.py @@ -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}) diff --git a/test/test_inference/test_stdlib.py b/test/test_inference/test_stdlib.py index 40f38053b..e17a88b30 100644 --- a/test/test_inference/test_stdlib.py +++ b/test/test_inference/test_stdlib.py @@ -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()]