##// END OF EJS Templates
Backport PR #10859: Don't list pygments styles on import
Thomas Kluyver -
Show More
@@ -23,7 +23,7 b' from prompt_toolkit.key_binding.manager import KeyBindingManager'
23 from prompt_toolkit.layout.processors import ConditionalProcessor, HighlightMatchingBracketProcessor
23 from prompt_toolkit.layout.processors import ConditionalProcessor, HighlightMatchingBracketProcessor
24 from prompt_toolkit.styles import PygmentsStyle, DynamicStyle
24 from prompt_toolkit.styles import PygmentsStyle, DynamicStyle
25
25
26 from pygments.styles import get_style_by_name, get_all_styles
26 from pygments.styles import get_style_by_name
27 from pygments.style import Style
27 from pygments.style import Style
28 from pygments.token import Token
28 from pygments.token import Token
29
29
@@ -134,9 +134,11 b' class TerminalInteractiveShell(InteractiveShell):'
134 help="Enable mouse support in the prompt"
134 help="Enable mouse support in the prompt"
135 ).tag(config=True)
135 ).tag(config=True)
136
136
137 # We don't load the list of styles for the help string, because loading
138 # Pygments plugins takes time and can cause unexpected errors.
137 highlighting_style = Union([Unicode('legacy'), Type(klass=Style)],
139 highlighting_style = Union([Unicode('legacy'), Type(klass=Style)],
138 help="""The name or class of a Pygments style to use for syntax
140 help="""The name or class of a Pygments style to use for syntax
139 highlighting: \n %s""" % ', '.join(get_all_styles())
141 highlighting. To see available styles, run `pygmentize -L styles`."""
140 ).tag(config=True)
142 ).tag(config=True)
141
143
142
144
General Comments 0
You need to be logged in to leave comments. Login now