Skip to content

Commit

Permalink
fixed mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hrnn committed Dec 5, 2024
1 parent db40ef4 commit e0a7cb2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -2632,7 +2632,7 @@ def countgd_sam2_video_tracking(
) -> List[List[Dict[str, Any]]]:
"""`countgd_sam2_video_tracking` it is only a test method"""

results = [None] * len(frames)
results: List[Optional[List[Dict[str, Any]]]] = [None] * len(frames)

if chunk_length is None:
step = 1 # Process every frame
Expand All @@ -2646,8 +2646,10 @@ def countgd_sam2_video_tracking(

image_size = frames[0].shape[:2]

def _transform_detections(input_list):
output_list = []
def _transform_detections(
input_list: List[Optional[List[Dict[str, Any]]]]
) -> List[Optional[Dict[str, Any]]]:
output_list: List[Optional[Dict[str, Any]]] = []

for idx, frame in enumerate(input_list):
if frame is not None:
Expand Down

0 comments on commit e0a7cb2

Please sign in to comment.