Skip to content

Commit 1afdf0f

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b544f10 commit 1afdf0f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compression/lz78.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@dataclass
1313
class Token:
1414
"""
15-
Dataclass representing pair called token consisting of the dictionary index
15+
Dataclass representing pair called token consisting of the dictionary index
1616
and a single character that follows the phrase in the dictionary.
1717
"""
1818

@@ -81,8 +81,8 @@ def decompress(self, tokens: list[Token]) -> str:
8181
8282
Tests:
8383
>>> lz78_compressor = LZ78Compressor()
84-
>>> lz78_compressor.decompress([Token(0, 'c'), Token(0, 'a'), Token(0, 'b'),
85-
... Token(0, 'r'), Token(2, 'c'), Token(2, 'd'), Token(2, 'b'), Token(4, 'a'),
84+
>>> lz78_compressor.decompress([Token(0, 'c'), Token(0, 'a'), Token(0, 'b'),
85+
... Token(0, 'r'), Token(2, 'c'), Token(2, 'd'), Token(2, 'b'), Token(4, 'a'),
8686
... Token(4, 'r'), Token(2, 'r'), Token(8, 'd')])
8787
'cabracadabrarrarrad'
8888
>>> lz78_compressor.decompress([Token(0, 'a'), Token(0, 'b'), Token(1, 'b'),

0 commit comments

Comments
 (0)