You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TerminalInteractiveShell.highlighting_style determines prompt colours and syntax highlighting. It takes the name (as a string) or class (as a subclass of pygments.style.Style) of a Pygments style, or the special value 'legacy' to pick a style in accordance with InteractiveShell.colors.
(emphasis added). But if I set highlighting_style = "default" in my IPython startup file, and enable prettyprinter integration, then I get a traceback ending in:
~/.user-python3.5-64bit/local/lib/python3.5/site-packages/prettyprinter/color.py in colored_render_to_stream(stream, sdocs, style, newline, separator)
213 except KeyError:
214 pygments_token = _SYNTAX_TOKEN_TO_PYGMENTS_TOKEN[sdoc.value]
--> 215 tokenattrs = style.style_for_token(pygments_token)
216 color = styleattrs_to_colorful(tokenattrs)
217 color_cache[sdoc.value] = color
AttributeError: 'str' object has no attribute 'style_for_token'
I think there's some missing if instance(style, str): style = pygments.styles.get_style_by_name(style)
The text was updated successfully, but these errors were encountered:
According to https://ipython.readthedocs.io/en/stable/config/details.html#terminal-colors:
(emphasis added). But if I set
highlighting_style = "default"
in my IPython startup file, and enable prettyprinter integration, then I get a traceback ending in:I think there's some missing
if instance(style, str): style = pygments.styles.get_style_by_name(style)
The text was updated successfully, but these errors were encountered: