strict typechecking

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-08-16 11:32:47 +02:00
parent f30e6baa67
commit 76941efc7e
44 changed files with 165 additions and 155 deletions
+1 -1
View File
@@ -288,7 +288,7 @@ def calculate_eye_position(face_bbox: dict) -> tuple:
return (eye_x, eye_y)
def draw_bounding_boxes(image: Image.Image, detections: list, points: list | None = None) -> Image.Image:
def draw_bounding_boxes(image: Image.Image, detections: list, points: list | None = None) -> Image.Image | None:
"""
Draw bounding boxes and/or points on an image.
+2 -1
View File
@@ -270,7 +270,8 @@ class WaifuDiffusionTagger:
character_count = 0
rating_count = 0
for i, (tag_name, prob) in enumerate(zip(self.tags, probs, strict=False)):
tags = self.tags or []
for i, (tag_name, prob) in enumerate(zip(tags, probs, strict=False)):
category = self.tag_categories[i]
tag_lower = tag_name.lower()