Replaced yield with yield from to address latest sanity test

Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
Hideki Saito 2024-03-26 13:54:40 +09:00
parent a356bdd3c4
commit ac82f575c6
1 changed files with 2 additions and 4 deletions

View File

@ -64,8 +64,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
# newline that our naive format() added
data_as_list[-1] = data_as_list[-1][:-1]
for line in data_as_list:
yield line
yield from data_as_list
def mock_open(mock=None, read_data=''):
"""
@ -93,8 +92,7 @@ if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
if handle.readline.return_value is not None:
while True:
yield handle.readline.return_value
for line in _data:
yield line
yield from _data
global file_spec
if file_spec is None: