chore(api/core): Improve FileVar's type hint and imports. (#7290)

This commit is contained in:
-LAN- 2024-08-15 12:43:18 +08:00 • committed by GitHub
commit 8f16165f92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 68 additions and 59 deletions

View file

@ -99,7 +99,7 @@ class MessageFileParser:
# return all file objs
return new_files
def transform_message_files(self, files: list[MessageFile], file_extra_config: FileExtraConfig) -> list[FileVar]:
def transform_message_files(self, files: list[MessageFile], file_extra_config: FileExtraConfig):
"""
transform message files
@ -144,7 +144,7 @@ class MessageFileParser:
return type_file_objs
def _to_file_obj(self, file: Union[dict, MessageFile], file_extra_config: FileExtraConfig) -> FileVar:
def _to_file_obj(self, file: Union[dict, MessageFile], file_extra_config: FileExtraConfig):
"""
transform file to file obj