diff options
| author | Vilnis Termanis <vilnis.termanis@iotics.com> | 2020-09-17 22:24:44 +0100 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2020-12-24 14:11:22 +0100 |
| commit | caa8a647a801c8170e61a7d80ea8e723289e6950 (patch) | |
| tree | a409f4025160d631b46f744d6a6c8c6c9f613cad | |
| parent | ef0edfe89a9363d2ea4557ce3ceac6d5dd1e90b5 (diff) | |
| download | astroid-git-caa8a647a801c8170e61a7d80ea8e723289e6950.tar.gz | |
Fix starred_assigned_stmts elts cast (introduced in d68f2935)
Don't replace elts (deque) used in loop with list
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | astroid/protocols.py | 3 |
2 files changed, 5 insertions, 3 deletions
@@ -13,11 +13,14 @@ Release Date: TBA Fixes PyCQA/pylint#3640 -* Fixes a bug in the signature of the ``ndarray.__or__`` method, +* Fixes a bug in the signature of the ``ndarray.__or__`` method, in the ``brain_numpy_ndarray.py`` module. Fixes #815 +* Fixes a to-list cast bug in ``starred_assigned_stmts`` method, + in the ``protocols.py` module. + * Added a brain for ``hypothesis.strategies.composite`` * The transpose of a ``numpy.ndarray`` is also a ``numpy.ndarray`` diff --git a/astroid/protocols.py b/astroid/protocols.py index dc66ca2c..0d2fb99f 100644 --- a/astroid/protocols.py +++ b/astroid/protocols.py @@ -686,11 +686,10 @@ def starred_assigned_stmts(self, node=None, context=None, assign_path=None): continue # We're done unpacking. - elts = list(elts) packed = nodes.List( ctx=Store, parent=self, lineno=lhs.lineno, col_offset=lhs.col_offset ) - packed.postinit(elts=elts) + packed.postinit(elts=list(elts)) yield packed break |
