videodb-python icon indicating copy to clipboard operation
videodb-python copied to clipboard

Refactor: Add comprehensive type hints and fix search_title bug

Open anzinmhd opened this issue 6 months ago • 1 comments

Description

This PR implements enterprise-grade type hints across the core VideoDB Python SDK. It also fixes a structural bug in the search_title method and resolves a pending TODO for the Meeting type check.

Key Changes

  • Type Safety: Added type hints to all major modules (client, collection, video, editor, rtstream, audio, etc.) to improve IDE support and prevent bugs.
  • Bug Fix: Updated Collection.search_title to return List[Video] instead of raw dictionaries, ensuring consistency with the rest of the SDK.
  • Technical Debt: Resolved the long-standing TODO in video.py for the Meeting class type check.
  • Architectural Polish: Handled circular dependencies using TYPE_CHECKING blocks and string forward references.

Verification (Proof)

  • New Tests: Added tests/test_collection.py and tests/test_video.py to verify the fixes.
  • Pytest: Ran full suite, 7/7 tests passed.
  • Linting: Verified with ruff check . (0 errors).

anzinmhd avatar May 07 '26 14:05 anzinmhd

Hi everyone, I wanted to follow up on this PR. I’ve implemented PEP 484 type hints to improve IDE support and resolved a circular dependency issue that was impacting the core architecture. I’ve also added unit tests and verified the fix for search_title using pytest. I understand you are all very busy, but if you could find some time to review this, I’d love to hear your thoughts on these architectural improvements. I’m happy to make any adjustments based on your feedback!.

anzinmhd avatar May 19 '26 07:05 anzinmhd