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

This commit is contained in:
-LAN- 2024-06-20 15:16:21 +08:00 • committed by GitHub
commit 23fa3dedc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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: