diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-06 01:26:50 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-10-06 01:26:50 +0300 |
commit | 70f44207515c7dc9b74948ff18b5f68cfed21861 (patch) | |
tree | 5506a8fcc9b76c9b7e0ef3f48bab97240bebf651 | |
parent | 7fe6eb2afac0abb1aae04414c1fb3c69df79ad8b (diff) | |
download | astroid-70f44207515c7dc9b74948ff18b5f68cfed21861.tar.gz |
Fix pylint errors.
-rw-r--r-- | astroid/as_string.py | 14 | ||||
-rw-r--r-- | astroid/tests/unittest_python3.py | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/astroid/as_string.py b/astroid/as_string.py index 14ef45f..0d7ba51 100644 --- a/astroid/as_string.py +++ b/astroid/as_string.py @@ -163,13 +163,13 @@ class AsStringVisitor(object): def _visit_dict(self, node): for key, value in node.items: - key = key.accept(self) - value = value.accept(self) - if key == '**': - # It can only be a DictUnpack node. - yield key + value - else: - yield '%s: %s' % (key, value) + key = key.accept(self) + value = value.accept(self) + if key == '**': + # It can only be a DictUnpack node. + yield key + value + else: + yield '%s: %s' % (key, value) def visit_dictunpack(self, node): return '**' diff --git a/astroid/tests/unittest_python3.py b/astroid/tests/unittest_python3.py index e89fd1e..f98d220 100644 --- a/astroid/tests/unittest_python3.py +++ b/astroid/tests/unittest_python3.py @@ -233,7 +233,7 @@ class Python3TC(unittest.TestCase): self.assertEqual(node.as_string(), code) keys = [key for (key, _) in node.items] self.assertIsInstance(keys[0], nodes.Const) - self.assertIsInstance(keys[1], nodes.DictUnpack) + self.assertIsInstance(keys[1], nodes.DictUnpack) @require_version('3.5') def test_nested_unpacking_in_dicts(self): |