KEKE046 opened a new pull request, #212: URL: https://github.com/apache/tvm-ffi/pull/212
Update type hint for register_object function. This pull request introduces a minor type hint improvement to the `register_object` function in `python/tvm_ffi/registry.py`. The change enhances type safety by introducing a type variable for the function's return type. * Improved type hinting for `register_object` by adding a `_T` type variable, ensuring the decorator preserves the original type of the class it decorates. Before, the decorated object is treated as a value, and cause type lint errors <img width="592" height="171" alt="image" src="https://github.com/user-attachments/assets/a5cd248a-c48e-4755-8706-c836993ee6f0" /> After, the object is treated as a type <img width="596" height="183" alt="image" src="https://github.com/user-attachments/assets/4b0bd484-7e6a-4830-b10a-bec8f90da9de" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
