summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authorJessie Wincek <jbwincek@gmail.com>2016-06-02 10:47:17 -0700
committerJessie Wincek <jbwincek@gmail.com>2016-06-02 10:47:17 -0700
commit89a4adc825f44aa4b32f559e4b540d44572cb06a (patch)
treeaf06ebc969cd26e387c4d192fd73baf9d829e618 /pygments
parent7654e964ef10b3a48d4d7d9452b8492ab29ae218 (diff)
downloadpygments-89a4adc825f44aa4b32f559e4b540d44572cb06a.tar.gz
Added Python cls builtin word token recognition
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/python.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py
index 7601afa8..35635ed1 100644
--- a/pygments/lexers/python.py
+++ b/pygments/lexers/python.py
@@ -116,7 +116,7 @@ class PythonLexer(RegexLexer):
'unichr', 'unicode', 'vars', 'xrange', 'zip'),
prefix=r'(?<!\.)', suffix=r'\b'),
Name.Builtin),
- (r'(?<!\.)(self|None|Ellipsis|NotImplemented|False|True'
+ (r'(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls'
r')\b', Name.Builtin.Pseudo),
(words((
'ArithmeticError', 'AssertionError', 'AttributeError',
@@ -303,7 +303,7 @@ class Python3Lexer(RegexLexer):
'sum', 'super', 'tuple', 'type', 'vars', 'zip'), prefix=r'(?<!\.)',
suffix=r'\b'),
Name.Builtin),
- (r'(?<!\.)(self|Ellipsis|NotImplemented)\b', Name.Builtin.Pseudo),
+ (r'(?<!\.)(self|Ellipsis|NotImplemented|cls)\b', Name.Builtin.Pseudo),
(words((
'ArithmeticError', 'AssertionError', 'AttributeError',
'BaseException', 'BufferError', 'BytesWarning', 'DeprecationWarning',