chardet: improve stubs (#8155)

This commit is contained in:
Shantanu
2022-06-25 19:10:58 +05:30
committed by GitHub
parent 14628b519a
commit 564347b04e

View File

@@ -1,9 +1,6 @@
import sys
from typing import Any
from .universaldetector import UniversalDetector as UniversalDetector
def __getattr__(name: str) -> Any: ... # incomplete
from .universaldetector import UniversalDetector as UniversalDetector, _FinalResultType, _IntermediateResultType
if sys.version_info >= (3, 8):
from typing import TypedDict
@@ -24,3 +21,8 @@ class _SMModelType(TypedDict):
state_table: tuple[int, ...]
char_len_table: tuple[int, ...]
name: str
VERSION: list[str]
def detect(byte_str: bytes | bytearray) -> _FinalResultType: ...
def detect_all(byte_str: bytes | bytearray, ignore_threshold: bool = ...) -> list[_IntermediateResultType]: ...