Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/utils/compression.py @ 51762:ca7bde5dbafb
black: format the codebase with 23.3.0
The CI has moved to 23.3.0, which is the last version that supports 3.7
at runtime, so we should honor this change.
# skip-blame mass-reformating only
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 18 Jul 2024 12:36:12 +0200 |
parents | 7f0cb9ee0534 |
children | f4733654f144 |
comparison
equal
deleted
inserted
replaced
51761:b0a4de6c14f8 | 51762:ca7bde5dbafb |
---|---|
509 else: | 509 else: |
510 z = zlib.compressobj(level=self._level) | 510 z = zlib.compressobj(level=self._level) |
511 parts = [] | 511 parts = [] |
512 pos = 0 | 512 pos = 0 |
513 while pos < insize: | 513 while pos < insize: |
514 pos2 = pos + 2 ** 20 | 514 pos2 = pos + 2**20 |
515 parts.append(z.compress(data[pos:pos2])) | 515 parts.append(z.compress(data[pos:pos2])) |
516 pos = pos2 | 516 pos = pos2 |
517 parts.append(z.flush()) | 517 parts.append(z.flush()) |
518 | 518 |
519 if sum(map(len, parts)) < insize: | 519 if sum(map(len, parts)) < insize: |