Skip to content

Commit

Permalink
Ignore pylint warnings for construct that does not work with Python 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Mar 23, 2024
1 parent 8ed1ddd commit 92c19c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/module_utils/_api/api/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def _stream_helper(self, response, decode=False):

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
Expand Down Expand Up @@ -390,7 +390,7 @@ def _stream_raw_result(self, response, chunk_size=1, decode=True):
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):
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/_api/utils/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def rec_walk(current_dir):
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)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/plugins/module_utils/test_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


def _simple_generator(sequence):
for elt in sequence:
for elt in sequence: # pylint: disable=use-yield-from
yield elt


Expand Down

0 comments on commit 92c19c7

Please sign in to comment.