summaryrefslogtreecommitdiff
path: root/pygments/formatters
diff options
context:
space:
mode:
authorMatthias Bussonnier <bussonniermatthias@gmail.com>2016-02-14 15:17:47 -0800
committerMatthias Bussonnier <bussonniermatthias@gmail.com>2016-02-14 15:17:47 -0800
commita34c939edf7b8b3f008daa3c1b7e2c94d34db550 (patch)
tree877beecd4b9ef9f634fd443a654e29471cf90d75 /pygments/formatters
parent5cc92cf8771627278cdb7b374ba0a101fad72bd2 (diff)
downloadpygments-a34c939edf7b8b3f008daa3c1b7e2c94d34db550.tar.gz
Rename ansilist that now is a set, slipped though PR 531 review
Diffstat (limited to 'pygments/formatters')
-rw-r--r--pygments/formatters/terminal256.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/formatters/terminal256.py b/pygments/formatters/terminal256.py
index 03c3a42a..5110bc9e 100644
--- a/pygments/formatters/terminal256.py
+++ b/pygments/formatters/terminal256.py
@@ -28,7 +28,7 @@ import sys
from pygments.formatter import Formatter
from pygments.console import codes
-from pygments.style import ansilist
+from pygments.style import ansicolors
__all__ = ['Terminal256Formatter', 'TerminalTrueColorFormatter']
@@ -49,7 +49,7 @@ class EscapeSequence:
def color_string(self):
attrs = []
if self.fg is not None:
- if self.fg in ansilist:
+ if self.fg in ansicolors:
esc = codes[self.fg[5:]]
if ';01m' in esc:
self.bold = True
@@ -58,7 +58,7 @@ class EscapeSequence:
else:
attrs.extend(("38", "5", "%i" % self.fg))
if self.bg is not None:
- if self.bg in ansilist:
+ if self.bg in ansicolors:
esc = codes[self.bg[5:]]
# extract fg color code, add 10 for bg.
attrs.append(str(int(esc[2:4])+10))
@@ -188,7 +188,7 @@ class Terminal256Formatter(Formatter):
def _color_index(self, color):
index = self.best_match.get(color, None)
- if color in ansilist:
+ if color in ansicolors:
# strip the `#ansi` part and look up code
index = color
self.best_match[color] = index