ThanhNguyxn commited on
Commit
2a21066
·
verified ·
1 Parent(s): 2426b45

fix: wrong return type annotation in resampling() function

Browse files

## Summary
- Fix `resampling()` function return type: `-> str` should be `-> list[Image.Image]`

## Details
The `resampling()` function at line 26 was incorrectly annotated with return type `str`, but the function actually returns a list of PIL Image objects:

```python
# Before (incorrect)
def resampling(...) -> str:
...
frames = [Image.fromarray(frame) for frame in frames]
return frames # Returns list[Image.Image], not str!

# After (correct)
def resampling(...) -> list[Image.Image]:
...
```

This is a clear type annotation bug that could confuse IDEs, type checkers, and developers.

Files changed (1) hide show
  1. kimi_k25_vision_processing.py +1 -1
kimi_k25_vision_processing.py CHANGED
@@ -27,7 +27,7 @@ def resampling(video_bytes: bytes,
27
  sample_indices: list[int],
28
  key_indices=None,
29
  frame_time_info=None,
30
- num_threads=4) -> str:
31
  video = VideoReader(video_bytes,
32
  num_threads=num_threads,
33
  frame_time_info=frame_time_info,
 
27
  sample_indices: list[int],
28
  key_indices=None,
29
  frame_time_info=None,
30
+ num_threads=4) -> list[Image.Image]:
31
  video = VideoReader(video_bytes,
32
  num_threads=num_threads,
33
  frame_time_info=frame_time_info,