Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/chardet/resultdict.py: 38%
8 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-10-05 06:32 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2023-10-05 06:32 +0000
1from typing import TYPE_CHECKING, Optional
3if TYPE_CHECKING:
4 # TypedDict was introduced in Python 3.8.
5 #
6 # TODO: Remove the else block and TYPE_CHECKING check when dropping support
7 # for Python 3.7.
8 from typing import TypedDict
10 class ResultDict(TypedDict):
11 encoding: Optional[str]
12 confidence: float
13 language: Optional[str]
15else:
16 ResultDict = dict