Update idna-3.3

This commit is contained in:
JonnyWong16 2021-10-14 20:59:44 -07:00
parent 2f1a08009f
commit a3bfabb5f6
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
9 changed files with 7591 additions and 6113 deletions

View file

@ -1,12 +1,13 @@
from .core import *
from .codec import *
from typing import Any, Union
def ToASCII(label):
def ToASCII(label: str) -> bytes:
return encode(label)
def ToUnicode(label):
def ToUnicode(label: Union[bytes, bytearray]) -> str:
return decode(label)
def nameprep(s):
raise NotImplementedError("IDNA 2008 does not utilise nameprep protocol")
def nameprep(s: Any) -> None:
raise NotImplementedError('IDNA 2008 does not utilise nameprep protocol')