majiayu000 commented on PR #617: URL: https://github.com/apache/burr/pull/617#issuecomment-3734413990
Thanks for the review\! I've updated the code according to your suggestion: - Removed the `TYPE_CHECKING` + `Any` approach - Added `"types.UnionType"` (with quotes) to the Union type hints The type definitions are now: ```python # burr/integrations/pydantic.py PartialType = Union[Type[pydantic.BaseModel], Type[dict], type, "types.UnionType"] # burr/core/action.py stream_type: Union[Type["BaseModel"], Type[dict], type, "types.UnionType"] ``` This should satisfy pyright while properly accepting union type objects like `str | int` for the `stream_type` parameter. -- 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]
