fix(core): Fix incorrect type hints. (#5427)

This commit is contained in:
-LAN-
2024-06-20 15:16:21 +08:00
committed by GitHub
parent e4259a8f13
commit 23fa3dedc4
11 changed files with 166 additions and 117 deletions

View File

@@ -1,15 +1,12 @@
import os
from collections import OrderedDict
from collections.abc import Callable
from typing import Any, AnyStr
from typing import Any
from core.tools.utils.yaml_utils import load_yaml_file
def get_position_map(
folder_path: AnyStr,
file_name: str = '_position.yaml',
) -> dict[str, int]:
def get_position_map(folder_path: str, *, file_name: str = "_position.yaml") -> dict[str, int]:
"""
Get the mapping from name to index from a YAML file
:param folder_path: