"git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "a99d4fbfe38310887c104704d117bb9d8b6557a5"
Unverified Commit 086ac752 authored by Chenlei Hu's avatar Chenlei Hu Committed by GitHub
Browse files

3.8 Compatible type annotation (#3938)

parent d7484ef3
import os import os
import time import time
import logging import logging
from typing import Set, List, Dict, Tuple
supported_pt_extensions: set[str] = set(['.ckpt', '.pt', '.bin', '.pth', '.safetensors', '.pkl']) supported_pt_extensions: Set[str] = set(['.ckpt', '.pt', '.bin', '.pth', '.safetensors', '.pkl'])
SupportedFileExtensionsType = set[str] SupportedFileExtensionsType = Set[str]
ScanPathType = list[str] ScanPathType = List[str]
folder_names_and_paths: dict[str, tuple[ScanPathType, SupportedFileExtensionsType]] = {} folder_names_and_paths: Dict[str, Tuple[ScanPathType, SupportedFileExtensionsType]] = {}
base_path = os.path.dirname(os.path.realpath(__file__)) base_path = os.path.dirname(os.path.realpath(__file__))
models_dir = os.path.join(base_path, "models") models_dir = os.path.join(base_path, "models")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment