Codebase list astroid / 6690d3d
New upstream version 2.0.4 Nicolas Dandrimont 5 years ago
6 changed file(s) with 30 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
00 ===================
11 astroid's ChangeLog
22 ===================
3
4 What's New in astroid 2.0.4?
5 ============================
6 Release Date: 2018-08-10
7
8 * Make sure that assign nodes can find ``yield`` statements in their values
9
10 Close PyCQA/pylint#2400
311
412 What's New in astroid 2.0.3?
513 ============================
00 Metadata-Version: 1.2
11 Name: astroid
2 Version: 2.0.3
2 Version: 2.0.4
33 Summary: An abstract syntax tree for Python with inference support.
44 Home-page: https://github.com/PyCQA/astroid
55 Author: Python Code Quality Authority
2020
2121 modname = 'astroid'
2222
23 version = '2.0.3'
23 version = '2.0.4'
2424 numversion = tuple(int(elem) for elem in version.split('.') if elem.isdigit())
2525
2626 extras_require = {}
17621762
17631763 yield from self.value._get_assign_nodes()
17641764
1765 def _get_yield_nodes_skip_lambdas(self):
1766 yield from self.value._get_yield_nodes_skip_lambdas()
1767
17651768
17661769 class AnnAssign(mixins.AssignTypeMixin, Statement):
17671770 """Class representing an :class:`ast.AnnAssign` node.
962962 assert node.type_comment_returns.as_string() == expected_returns_string
963963
964964
965 def test_is_generator_for_yield_assignments():
966 node = astroid.extract_node('''
967 class A:
968 def test(self):
969 a = yield
970 while True:
971 print(a)
972 yield a
973 a = A()
974 a.test
975 ''')
976 inferred = next(node.infer())
977 assert isinstance(inferred, astroid.BoundMethod)
978 assert bool(inferred.is_generator())
979
980
965981 if __name__ == '__main__':
966982 unittest.main()
00 Metadata-Version: 1.2
11 Name: astroid
2 Version: 2.0.3
2 Version: 2.0.4
33 Summary: An abstract syntax tree for Python with inference support.
44 Home-page: https://github.com/PyCQA/astroid
55 Author: Python Code Quality Authority