Fix mypy issues

This commit is contained in:
henryruhs
2025-06-30 18:38:18 +02:00
parent 83d3ccdc7e
commit d42770207a
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -16,4 +16,4 @@ jobs:
- run: pip install flake8-import-order
- run: pip install mypy
- run: flake8 facefusion_api
- run: mypy facefusion_api
- run: mypy facefusion_api --explicit-package-bases
+1 -1
View File
@@ -54,7 +54,7 @@ class SwapFaceImage:
return (output_tensor,)
@staticmethod
def swap_face(source_tensor : Tensor, target_tensor, api_token : str, face_swapper_model : FaceSwapperModel) -> Tensor:
def swap_face(source_tensor : Tensor, target_tensor : Tensor, api_token : str, face_swapper_model : FaceSwapperModel) -> Tensor:
source_buffer : BytesIO = tensor_to_bytesio(source_tensor, mime_type = 'image/webp')
target_buffer : BytesIO = tensor_to_bytesio(target_tensor, mime_type = 'image/webp')
+2 -2
View File
@@ -1,7 +1,7 @@
from typing import Any, Dict, Literal, Type, TypeAlias
from typing import Any, Dict, Literal, TypeAlias
NodeInputTypes : TypeAlias = Dict[str, Any]
NodeClassMapping : TypeAlias = Dict[str, Type]
NodeClassMapping : TypeAlias = Dict[str, Any]
NodeDisplayNameMapping : TypeAlias = Dict[str, str]
Image : TypeAlias = Any