Debian Codegraph @

lib/Crypto/Util/py3compat.pyi

raw symbols SCIP
1 from typing import Union, Any, Optional, IO
2
3 Buffer = Union[bytes, bytearray, memoryview]
4
5 import sys
6
7 def b(s: str) -> bytes: ...
8 def bchr(s: int) -> bytes: ...
9 def bord(s: bytes) -> int: ...
10 def tobytes(s: Union[bytes, str]) -> bytes: ...
11 def tostr(b: bytes) -> str: ...
12 def bytestring(x: Any) -> bool: ...
13
14 def is_native_int(s: Any) -> bool: ...
15 def is_string(x: Any) -> bool: ...
16 def is_bytes(x: Any) -> bool: ...
17
18 def BytesIO(b: bytes) -> IO[bytes]: ...
19 def StringIO(s: str) -> IO[str]: ...
20
21 if sys.version_info[0] == 2:
22 from sys import maxint
23 iter_range = xrange
24
25 else:
26 from sys import maxsize as maxint
27 iter_range = range
28
29 class FileNotFoundError:
30 def __init__(self, err: int, msg: str, filename: str) -> None:
31 pass
32
33 def _copy_bytes(start: Optional[int], end: Optional[int], seq: Buffer) -> bytes: ...