forked from omicron/d2warehouse
Fix several issues revealed by testing and static analysis
- Fix type annotations in d2warehouse.stash - Fix invalid escape sequences in d2warehouse.item - Bump the minimum supported version of python to 3.10 - Fix ambiguous variable name in d2warehouse.huffman
This commit is contained in:
@@ -62,9 +62,9 @@ decode_tree = decodetree(code)
|
||||
|
||||
|
||||
def decode(bits: bitarray, n) -> tuple[str, int]:
|
||||
s = "".join(itertools.islice(bits.iterdecode(decode_tree), n))
|
||||
l = len(encode(s))
|
||||
return s, l
|
||||
text = "".join(itertools.islice(bits.iterdecode(decode_tree), n))
|
||||
length = len(encode(text))
|
||||
return text, length
|
||||
|
||||
|
||||
def encode(s: str) -> bitarray:
|
||||
|
||||
Reference in New Issue
Block a user