-
Notifications
You must be signed in to change notification settings - Fork 87
/
core.pyi
39 lines (37 loc) · 1.43 KB
/
core.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from typing import Union
from .intranges import intranges_contain as intranges_contain # noqa
class IDNAError(UnicodeError): ...
class IDNABidiError(IDNAError): ...
class InvalidCodepoint(IDNAError): ...
class InvalidCodepointContext(IDNAError): ...
def _combining_class(cp: int) -> int: ...
def _is_script(cp: str, script: str) -> bool: ...
def _punycode(s: str) -> bytes: ...
def _unot(s: int) -> str: ...
def valid_label_length(label: Union[str, bytes]) -> bool: ...
def valid_string_length(label: Union[str, bytes], trailing_dot: bool) -> bool: ...
def check_bidi(label: str, check_ltr: bool = ...) -> bool: ...
def check_initial_combiner(label: str) -> bool: ...
def check_hyphen_ok(label: str) -> bool: ...
def check_nfc(label: str) -> None: ...
def valid_contextj(label: str, pos: int) -> bool: ...
def valid_contexto(label: str, pos: int, exception: bool = False) -> bool: ...
def check_label(label: Union[str, bytes, bytearray]) -> None: ...
def alabel(label: str) -> bytes: ...
def ulabel(label: Union[str, bytes, bytearray]) -> str: ...
def uts46_remap(
domain: str, std3_rules: bool = ..., transitional: bool = ...
) -> str: ...
def encode(
s: Union[str, bytes, bytearray],
strict: bool = False,
uts46: bool = False,
std3_rules: bool = False,
transitional: bool = False,
) -> bytes: ...
def decode(
s: Union[str, bytes, bytearray],
strict: bool = ...,
uts46: bool = ...,
std3_rules: bool = ...,
) -> str: ...