base85: avoid a spurious use-before-initialized warning in `pure` module
The error wasn't possible because the only way for `acc` to not be initialized
was if `len(text) == 0`. But then `0 % 5 == 0`, so no attempt at padding was
done. It's a simple enough fix to not have PyCharm flag this though. The value
needs to be reset on each loop iteration, so it's a line copy, not a line move.
--- a/mercurial/pure/base85.py Mon Sep 30 19:40:14 2024 -0400
+++ b/mercurial/pure/base85.py Fri Oct 04 23:09:56 2024 -0400
@@ -58,6 +58,8 @@
l = len(text)
out = []
+ acc = 0
+
for i in range(0, len(text), 5):
chunk = text[i : i + 5]
chunk = pycompat.bytestr(chunk)