diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2018-09-28 14:23:23 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-09-28 14:23:23 +0200 |
commit | b054781a7d27bb96e9c620769b5af1e9c58eaaa9 (patch) | |
tree | 16c2adb88aee0fd66001416aaf031520af4267e9 /astroid/inference.py | |
parent | bf344cf347eba40c4cfa347fcd97d312d29c1fe9 (diff) | |
download | astroid-git-b054781a7d27bb96e9c620769b5af1e9c58eaaa9.tar.gz |
Pass parameters by keyword name when inferring sequences.
Close PyCQA/pylint#2526
Diffstat (limited to 'astroid/inference.py')
-rw-r--r-- | astroid/inference.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/astroid/inference.py b/astroid/inference.py index b61427a0..b5403f5b 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -83,8 +83,9 @@ def infer_sequence(self, context=None): yield self else: values = _infer_sequence_helper(self, context) - new_seq = type(self)(self.lineno, self.col_offset, self.parent) + new_seq = type(self)(lineno=self.lineno, col_offset=self.col_offset, parent=self.parent) new_seq.postinit(values) + yield new_seq |