Skip to content

Commit

Permalink
Allow missing Python2Lexer for 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmojaki committed Dec 18, 2019
1 parent 0b782f6 commit 336e763
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion snoop/formatting.py
Expand Up @@ -10,14 +10,20 @@
import six
from pygments import highlight
from pygments.formatters.terminal256 import Terminal256Formatter
from pygments.lexers.python import Python3Lexer, Python2Lexer
from pygments.lexers.python import Python3Lexer
from pygments.styles.monokai import MonokaiStyle
from six import PY3

from snoop.utils import ensure_tuple, short_filename, my_cheap_repr, \
NO_ASTTOKENS, optional_numeric_label, try_statement, FormattedValue, ArgDefaultDict, lru_cache


try:
from pygments.lexers.python import Python2Lexer
except ImportError:
from pygments.lexers.python import PythonLexer as Python2Lexer


class StatementsDict(dict):
def __init__(self, source):
super(StatementsDict, self).__init__()
Expand Down

0 comments on commit 336e763

Please sign in to comment.