m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
402 B

6 months ago
  1. from typing import TYPE_CHECKING, Optional
  2. if TYPE_CHECKING:
  3. # TypedDict was introduced in Python 3.8.
  4. #
  5. # TODO: Remove the else block and TYPE_CHECKING check when dropping support
  6. # for Python 3.7.
  7. from typing import TypedDict
  8. class ResultDict(TypedDict):
  9. encoding: Optional[str]
  10. confidence: float
  11. language: Optional[str]
  12. else:
  13. ResultDict = dict