-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global update for type hinting: IconStr
enum and ColorStr
type alias
#3348
Comments
We moved away from literals in favor of enums. You could create While moving to enums we need to take care of backward compatibility for Let's discuss on discord if you want. |
Thanks, but about literals with ColorStr. I don't know how make and enum string and hex color in one type hinting. Only way - use type alias with I don't want use this:
How i can make this? |
I personally think we should leave colors and icons as-is. I mean, what is honestly the issue with |
OK, let's leave it as is for now and settle other things. Lots of changes recently and there are even more changes towards 1.0 :) |
Please Describe The Problem To Be Solved
I want to create new enum:
IconStr
intypes.py
.IconStr
enum's variables is all icons fromicons.py
.ColorStr = Union[HexStr, Literal['primary', 'on_primary', ...]
. Also i want to use this new variables in all controls(Optional): Suggest A Solution
Create enum
IconStr
with all icons fromicons.py
and create variableColorStr = Union[HexStr, Literal['primary', 'on_primary', ...]
It's for my future PR :)
The text was updated successfully, but these errors were encountered: