mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 07:50:32 +00:00
* Refactor: Introduce Union types for streamlined type handling Implemented Union types across various modules to consolidate and simplify type annotations. This change replaces repetitive union declarations with reusable Union aliases, improving code readability and maintainability. Updates applied to affected classes, methods, and imports accordingly. * Refactor unions into type aliases for better reusability Replaced inline `Union` types with predefined aliases like `MediaUnion`, `ReplyMarkupUnion`, and `ChatIdUnion`. Simplifies type annotations, improves code readability, and reduces duplication. Added `media_union.py` for grouping related media types. * Refactor type unions with ResultChatMemberUnion and ResultMenuButtonUnion Replaced verbose type definitions of chat member and menu button unions with `ResultChatMemberUnion` and `ResultMenuButtonUnion` for improved readability and maintainability. Updated relevant methods, modules, and documentation to use the new type aliases consistently. * Added changelog
5 lines
275 B
ReStructuredText
5 lines
275 B
ReStructuredText
Introduce Union types for streamlined type handling.
|
|
|
|
Implemented Union types across various modules to consolidate and simplify type annotations.
|
|
This change replaces repetitive union declarations with reusable Union aliases,
|
|
improving code readability and maintainability.
|