blob: b120b80acda517fe510fdc076f06c2bd8d99c580 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
"""pylint should detect yield and return mix inside generators"""
# pylint: disable=using-constant-test, inconsistent-return-statements
def somegen():
"""this is a bad generator"""
if True:
return 1
else:
yield 2
def moregen():
"""this is another bad generator"""
if True:
yield 1
else:
return 2
|