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 19, 2025
1 parent 104ac8f commit 6df0ba2
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 @@ -1187,7 +1187,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 @@ -1198,7 +1198,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 @@ -1223,7 +1223,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 @@ -1234,7 +1234,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 @@ -1263,7 +1263,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 @@ -1274,7 +1274,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 6df0ba2

Please sign in to comment.