Skip to content

Commit 171ed43

Browse files
Use sys.maxint for iteration
Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
1 parent 4a46da3 commit 171ed43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bioblend/galaxy/folders/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ def contents_iter(
107107
:rtype: dict
108108
:return: A generator for the folder contents
109109
"""
110-
total_rows: Optional[int] = None
110+
total_rows = sys.maxsize
111111
params = {
112112
"limit": limit,
113113
"offset": 0,
114114
"include_deleted": include_deleted,
115115
}
116116

117-
while total_rows is None or params["offset"] <= total_rows:
117+
while params["offset"] <= total_rows:
118118
chunk = self._get(id=folder_id, contents=True, params=params)
119119
total_rows = chunk["metadata"]["total_rows"]
120120
yield from chunk["folder_contents"]

0 commit comments

Comments
 (0)