--- a/mercurial/util.py Thu Jul 18 12:03:29 2024 +0200
+++ b/mercurial/util.py Thu Jul 18 12:36:12 2024 +0200
@@ -1328,7 +1328,7 @@
self[k] = f[k]
def insert(self, position, key, value):
- for (i, (k, v)) in enumerate(list(self.items())):
+ for i, (k, v) in enumerate(list(self.items())):
if i == position:
self[key] = value
if i >= position:
@@ -2724,10 +2724,10 @@
def splitbig(chunks):
for chunk in chunks:
- if len(chunk) > 2 ** 20:
+ if len(chunk) > 2**20:
pos = 0
while pos < len(chunk):
- end = pos + 2 ** 18
+ end = pos + 2**18
yield chunk[pos:end]
pos = end
else:
@@ -2751,7 +2751,7 @@
while left > 0:
# refill the queue
if not queue:
- target = 2 ** 18
+ target = 2**18
for chunk in self.iter:
queue.append(chunk)
target -= len(chunk)
@@ -3081,12 +3081,12 @@
_sizeunits = (
- (b'm', 2 ** 20),
- (b'k', 2 ** 10),
- (b'g', 2 ** 30),
- (b'kb', 2 ** 10),
- (b'mb', 2 ** 20),
- (b'gb', 2 ** 30),
+ (b'm', 2**20),
+ (b'k', 2**10),
+ (b'g', 2**30),
+ (b'kb', 2**10),
+ (b'mb', 2**20),
+ (b'gb', 2**30),
(b'b', 1),
)