Closed hanjinliu closed 8 months ago
The changes across the project enhance support for union types and improve code quality. By incorporating Union
and UnionType
into type handling and modifying boolean comparisons for clarity, the updates reflect a focus on modern Python typing standards and cleaner code practices. Additionally, the test suite is expanded to cover new functionality, ensuring robustness.
Files | Summary |
---|---|
.../fields/_fields.py |
Introduced Union from typing , added imports from typing_extensions , and improved handling of union types. |
.../utils/_functions.py |
Expanded _type_like tuple by importing and adding UnionType from the types module. |
tests/test_fields.py |
Enhanced tests with Enum import, refined boolean comparisons, and added a new test for union fields. |
🐇✨
Changes in the code, oh so bright,
Unions and types, now just right.
Tests grow stronger, day by night,
With cleaner code, we take flight.
In fields and utils, our future's light!
🌟📚
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
T | None
was not interpreted as nullable widget. This PR fixes it.Summary by CodeRabbit
Union
types, improving flexibility in field definitions.UnionType
, enhancing the framework's robustness.