Skip to content

Commit 7b2e9b2

Browse files
Improve some parentheses (#1386)
1 parent ae3017d commit 7b2e9b2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fsspec/utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -507,14 +507,14 @@ def merge_offset_ranges(paths, starts, ends, max_gap=0, max_block=None, sort=Tru
507507
starts = [s or 0 for s in starts]
508508
# Sort by paths and then ranges if `sort=True`
509509
if sort:
510-
paths, starts, ends = [
510+
paths, starts, ends = (
511511
list(v)
512512
for v in zip(
513513
*sorted(
514514
zip(paths, starts, ends),
515515
)
516516
)
517-
]
517+
)
518518

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

0 commit comments

Comments
 (0)