-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Override RichJupyterWidget._get_color() because we use a custom style (IPython console) #16957
Conversation
Hello @bnavigator! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2022-02-14 00:21:23 UTC |
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 a lot for your help with this @bnavigator! It's great to have the right foreground color in equations for any library and not just Sympy.
Besides the tiny comment I left for you below, please also remove the calls to set_sympy_forecolor
shown below because they are not necessary anymore.
spyder/spyder/plugins/ipythonconsole/widgets/shell.py
Lines 326 to 332 in a433076
if not dark_color: | |
# Needed to change the colors of tracebacks | |
self.silent_execute("%colors linux") | |
self.call_kernel().set_sympy_forecolor(background_color='dark') | |
else: | |
self.silent_execute("%colors lightbg") | |
self.call_kernel().set_sympy_forecolor(background_color='light') |
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
I thought that call wasn't necessary anymore. Thanks a lot for checking that out! |
Note that SymPy behaves differently before and after calling
Edit: this was probably a bit off topic, but it is not always as straightforward to change the color directly. |
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.
@bnavigator, some small suggestions to go with the ones I made in PR jupyter/qtconsole#512. The this should be ready.
Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
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.
@bnavigator, thanks for your help in all related repos to solve this issue. It's a terrific improvement!
Note: The failure in our tests is unrelated to this change.
Description of Changes
This is a follow-up on jupyter/qtconsole#512
Issue(s) Resolved
Fixes #14895
Fixes last comments (non-sympy) in #3798
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: bnavigator