mercurial/cext/base85.pyi
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 05 Oct 2024 18:58:20 -0400
changeset 51964 d7f17819ae9e
parent 51723 9367571fea21
permissions -rw-r--r--
interfaces: introduce and use a protocol class for the `mpatch` module See f2832de2a46c for details when this was done for the `bdiff` module. Two things worth pointing out- 1) The `cffi` module "inherits" the `pure` implementation of `patchedsize()` because of its wildcard import. 2) It's odd that the `mpatchError` lives in both `pure` and `cext` modules. I initially thought to move the exception into the new class, and make the existing class name an alias to the class in the new location, but the exception is created in C code by the `cext` module, so that won't work. I don't think a protocol class is approriate, because there's nothing special about the class to distinguish from any other `Exception`. Fortunately, nobody is catching this exception in core, so we can kick the can down the road.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
46038
8dca9051a859 cext: add .pyi files for C extensions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
version: int
8dca9051a859 cext: add .pyi files for C extensions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
51723
9367571fea21 cext: correct the argument handling of `b85encode()`
Matt Harbison <matt_harbison@yahoo.com>
parents: 46038
diff changeset
     3
def b85encode(text: bytes, pad: bool = False) -> bytes: ...
46038
8dca9051a859 cext: add .pyi files for C extensions
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
def b85decode(text: bytes) -> bytes: ...