ci: fix no subtyping for type annotation in python3.7

https://peps.python.org/pep-0544/
This commit is contained in:
Fu Hanxi
2022-07-27 10:34:21 +08:00
parent 0d6de25d1c
commit f5cbe88c22
4 changed files with 5 additions and 5 deletions

View File

@@ -472,7 +472,7 @@ def init_cli(verbose_output: List=None) -> Any:
with open(os.path.join(args.build_dir, 'flasher_args.json')) as file:
flasher_args: Dict[str, Any] = json.load(file)
def flasher_path(f: Union[str, os.PathLike[str]]) -> str:
def flasher_path(f: Union[str, 'os.PathLike[str]']) -> str:
if type(args.build_dir) is bytes:
args.build_dir = args.build_dir.decode()
return _safe_relpath(os.path.join(args.build_dir, f))