New upstream version 2.0.4
Nicolas Dandrimont
5 years ago
0 | 0 |
===================
|
1 | 1 |
astroid's ChangeLog
|
2 | 2 |
===================
|
|
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
|
3 | 11 |
|
4 | 12 |
What's New in astroid 2.0.3?
|
5 | 13 |
============================
|
0 | 0 |
Metadata-Version: 1.2
|
1 | 1 |
Name: astroid
|
2 | |
Version: 2.0.3
|
|
2 |
Version: 2.0.4
|
3 | 3 |
Summary: An abstract syntax tree for Python with inference support.
|
4 | 4 |
Home-page: https://github.com/PyCQA/astroid
|
5 | 5 |
Author: Python Code Quality Authority
|
20 | 20 |
|
21 | 21 |
modname = 'astroid'
|
22 | 22 |
|
23 | |
version = '2.0.3'
|
|
23 |
version = '2.0.4'
|
24 | 24 |
numversion = tuple(int(elem) for elem in version.split('.') if elem.isdigit())
|
25 | 25 |
|
26 | 26 |
extras_require = {}
|
1762 | 1762 |
|
1763 | 1763 |
yield from self.value._get_assign_nodes()
|
1764 | 1764 |
|
|
1765 |
def _get_yield_nodes_skip_lambdas(self):
|
|
1766 |
yield from self.value._get_yield_nodes_skip_lambdas()
|
|
1767 |
|
1765 | 1768 |
|
1766 | 1769 |
class AnnAssign(mixins.AssignTypeMixin, Statement):
|
1767 | 1770 |
"""Class representing an :class:`ast.AnnAssign` node.
|
962 | 962 |
assert node.type_comment_returns.as_string() == expected_returns_string
|
963 | 963 |
|
964 | 964 |
|
|
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 |
|
965 | 981 |
if __name__ == '__main__':
|
966 | 982 |
unittest.main()
|
0 | 0 |
Metadata-Version: 1.2
|
1 | 1 |
Name: astroid
|
2 | |
Version: 2.0.3
|
|
2 |
Version: 2.0.4
|
3 | 3 |
Summary: An abstract syntax tree for Python with inference support.
|
4 | 4 |
Home-page: https://github.com/PyCQA/astroid
|
5 | 5 |
Author: Python Code Quality Authority
|