-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update CodeBlock class to accept rx.color in custom_style #3168
Conversation
As of a recent PR, we're not using black anymore (aside for .pyi files, but they're not edited manually anyway), Run |
Update CodeBlock class to accept rx.color in custom_style (without black)
Hopefully I've fixed the issue. Let me know if there's still any problems. Edit: Made a few more changes. Now, hopefully I've actually fixed the issues... |
@khhan0130 I think you just need to run |
@picklelo Thanks. Think the issue was that I didn't update reflex with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding! and for persisting with the linter :)
Type of change
Changes the types accepted in the CodeBlock class (components/datadisplay/code.py)
custom_style
fromUnion[str, Var]
toUnion[str, Var, Color]
. Fixes the issue whererx.color
does not work in the markdown component map, at least for code blocks.Includes one test under /tests/components/core/test_colors.py.
pytest passes the new tests, and there is one failure, although this was the case even before I made any changes.
A couple other changes were made with
poetry run black reflex tests
, which should not have any functional effect.Fixes #2957 (hopefully)