Skip to content

Commit b244532

Browse files
committed
Revert "Remove Enum to maintain Python 2 support"
This reverts commit ac93c74.
1 parent baf2426 commit b244532

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bpython/repl.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import traceback
3737
from itertools import takewhile
3838
from types import ModuleType
39+
from enum import Enum
3940

4041
from pygments.token import Token
4142
from pygments.lexers import Python3Lexer
@@ -355,12 +356,10 @@ class SourceNotFound(Exception):
355356
"""Exception raised when the requested source could not be found."""
356357

357358

358-
class LineTypeTranslator:
359+
class LineTypeTranslator(Enum):
359360
"""Used when adding a tuple to all_logical_lines, to get input / output values
360361
having to actually type/know the strings"""
361362

362-
# TODO use Enum once we drop support for Python 2
363-
364363
INPUT = "input"
365364
OUTPUT = "output"
366365

0 commit comments

Comments
 (0)