Show More
@@ -23,6 +23,16 if typing.TYPE_CHECKING: | |||||
23 | """The signature of `bdiff.blocks()` and `bdiff.xdiffblocks()`.""" |
|
23 | """The signature of `bdiff.blocks()` and `bdiff.xdiffblocks()`.""" | |
24 |
|
24 | |||
25 |
|
25 | |||
|
26 | class Base85(Protocol): | |||
|
27 | """A Protocol class for the various base85 module implementations.""" | |||
|
28 | ||||
|
29 | def b85encode(self, text: bytes, pad: bool = False) -> bytes: | |||
|
30 | """encode text in base85 format""" | |||
|
31 | ||||
|
32 | def b85decode(self, text: bytes) -> bytes: | |||
|
33 | """decode base85-encoded text""" | |||
|
34 | ||||
|
35 | ||||
26 | class BDiff(Protocol): |
|
36 | class BDiff(Protocol): | |
27 | """A Protocol class for the various bdiff module implementations.""" |
|
37 | """A Protocol class for the various bdiff module implementations.""" | |
28 |
|
38 |
@@ -70,6 +70,9 from . import ( | |||||
70 | typelib, |
|
70 | typelib, | |
71 | urllibcompat, |
|
71 | urllibcompat, | |
72 | ) |
|
72 | ) | |
|
73 | from .interfaces import ( | |||
|
74 | modules as intmod, | |||
|
75 | ) | |||
73 | from .utils import ( |
|
76 | from .utils import ( | |
74 | compression, |
|
77 | compression, | |
75 | hashutil, |
|
78 | hashutil, | |
@@ -87,7 +90,7 assert [ | |||||
87 | ] |
|
90 | ] | |
88 |
|
91 | |||
89 |
|
92 | |||
90 | base85 = policy.importmod('base85') |
|
93 | base85: intmod.Base85 = policy.importmod('base85') | |
91 | osutil = policy.importmod('osutil') |
|
94 | osutil = policy.importmod('osutil') | |
92 |
|
95 | |||
93 | b85decode = base85.b85decode |
|
96 | b85decode = base85.b85decode |
General Comments 0
You need to be logged in to leave comments.
Login now