From 5beff84c469a54dceae3377b51b824751616bcec Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 30 Oct 2023 12:54:14 +0100 Subject: [PATCH] Remove Support for Python 2 Lexing. I don't think there is much reasons to lex Python 2 with such a recent QtConsole/IPython. closes #588 --- qtconsole/jupyter_widget.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qtconsole/jupyter_widget.py b/qtconsole/jupyter_widget.py index cc9de877..3ecf8ab2 100644 --- a/qtconsole/jupyter_widget.py +++ b/qtconsole/jupyter_widget.py @@ -14,7 +14,7 @@ from qtpy import QtCore, QtGui -from IPython.lib.lexers import IPythonLexer, IPython3Lexer +from IPython.lib.lexers import IPython3Lexer from pygments.lexers import get_lexer_by_name from pygments.util import ClassNotFound from qtconsole import __version__ @@ -303,8 +303,6 @@ def _handle_kernel_info_reply(self, rep): # added here by hand. if pygments_lexer == 'ipython3': lexer = IPython3Lexer() - elif pygments_lexer == 'ipython2': - lexer = IPythonLexer() else: lexer = get_lexer_by_name(self.language_name) self._highlighter._lexer = lexer