Ignore pylint warnings for construct that does not work with Python 2.

This commit is contained in:
Felix Fontein 2024-03-23 10:43:47 +01:00
parent 8ed1dddbba
commit 92c19c78dc
3 changed files with 4 additions and 4 deletions

View File

@ -327,7 +327,7 @@ class APIClient(
if response.raw._fp.chunked:
if decode:
for chunk in json_stream.json_stream(self._stream_helper(response, False)):
for chunk in json_stream.json_stream(self._stream_helper(response, False)): # pylint: disable=use-yield-from
yield chunk
else:
reader = response.raw
@ -390,7 +390,7 @@ class APIClient(
socket = self._get_raw_response_socket(response)
self._disable_socket_timeout(socket)
for out in response.iter_content(chunk_size, decode):
for out in response.iter_content(chunk_size, decode): # pylint: disable=use-yield-from
yield out
def _read_from_socket(self, response, stream, tty=True, demux=False):

View File

@ -225,7 +225,7 @@ class PatternMatcher(object):
break
if skip:
continue
for sub in rec_walk(cur):
for sub in rec_walk(cur): # pylint: disable=use-yield-from
yield sub
return rec_walk(root)

View File

@ -13,7 +13,7 @@ from ansible_collections.community.docker.plugins.module_utils.copy import (
def _simple_generator(sequence):
for elt in sequence:
for elt in sequence: # pylint: disable=use-yield-from
yield elt