mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
chardet: improve stubs (#8155)
This commit is contained in:
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user