Skip to content

Commit

Permalink
Disable pylint not-an-iterable errors
Browse files Browse the repository at this point in the history
pylint cannot detect correctly nested generator types, therefore we ignore the
errors. Seems related pylint-dev/pylint#9252
  • Loading branch information
agoscinski committed Feb 21, 2025
1 parent 6a9e4e6 commit 46bfea4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ def test_get_objects_stream_closes(temp_dir, generate_random_data):
obj_md5s.keys(), skip_if_missing=True
) as triplets:
# I loop over the triplets, but I don't do anything
for _ in triplets:
for _ in triplets: # pylint: disable=not-an-iterable
assert len(current_process.open_files()) <= start_open_files + 1

# Check that at the end nothing is left open
Expand All @@ -1208,7 +1208,7 @@ def test_get_objects_stream_closes(temp_dir, generate_random_data):
obj_md5s.keys(), skip_if_missing=True
) as triplets:
# I loop over the triplets, but I don't do anything
for _, stream, _ in triplets:
for _, stream, _ in triplets: # pylint: disable=not-an-iterable
assert len(current_process.open_files()) <= start_open_files + 1
stream.read()

Expand All @@ -1233,7 +1233,7 @@ def test_get_objects_stream_closes(temp_dir, generate_random_data):

with temp_container.get_objects_stream_and_meta(obj_md5s.keys()) as triplets:
# I loop over the triplets, but I don't do anything
for _ in triplets:
for _ in triplets: # pylint: disable=not-an-iterable
assert len(current_process.open_files()) <= start_open_files + 1

# Check that at the end nothing is left open
Expand All @@ -1244,7 +1244,7 @@ def test_get_objects_stream_closes(temp_dir, generate_random_data):
obj_md5s.keys(), skip_if_missing=True
) as triplets:
# I loop over the triplets, but I don't do anything
for _, stream, _ in triplets:
for _, stream, _ in triplets: # pylint: disable=not-an-iterable
assert len(current_process.open_files()) <= start_open_files + 1
stream.read()
# Check that at the end nothing is left open
Expand Down Expand Up @@ -1273,7 +1273,7 @@ def test_get_objects_stream_closes(temp_dir, generate_random_data):

with temp_container.get_objects_stream_and_meta(obj_md5s.keys()) as triplets:
# I loop over the triplets, but I don't do anything
for _ in triplets:
for _ in triplets: # pylint: disable=not-an-iterable
assert len(current_process.open_files()) <= start_open_files + 1

# Check that at the end nothing is left open
Expand All @@ -1284,7 +1284,7 @@ def test_get_objects_stream_closes(temp_dir, generate_random_data):
obj_md5s.keys(), skip_if_missing=True
) as triplets:
# I loop over the triplets, but I don't do anything
for _, stream, _ in triplets:
for _, stream, _ in triplets: # pylint: disable=not-an-iterable
assert len(current_process.open_files()) <= start_open_files + 1
stream.read()
# Check that at the end nothing is left open
Expand Down

0 comments on commit 46bfea4

Please sign in to comment.