Skip to content

Commit

Permalink
Improve some areentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Oct 4, 2023
1 parent ae3017d commit f96adc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fsspec/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,14 +507,14 @@ def merge_offset_ranges(paths, starts, ends, max_gap=0, max_block=None, sort=Tru
starts = [s or 0 for s in starts]
# Sort by paths and then ranges if `sort=True`
if sort:
paths, starts, ends = [
paths, starts, ends = (
list(v)
for v in zip(
*sorted(
zip(paths, starts, ends),
)
)
]
)

if paths:
# Loop through the coupled `paths`, `starts`, and
Expand All @@ -528,7 +528,7 @@ def merge_offset_ranges(paths, starts, ends, max_gap=0, max_block=None, sort=Tru
elif (
paths[i] != paths[i - 1]
or ((starts[i] - new_ends[-1]) > max_gap)
or ((max_block is not None and (ends[i] - new_starts[-1]) > max_block))
or (max_block is not None and (ends[i] - new_starts[-1]) > max_block)
):
# Cannot merge with previous block.
# Add new `paths`, `starts`, and `ends` elements
Expand Down

0 comments on commit f96adc7

Please sign in to comment.