From 4a49415561c00e2d235d266ee81cb026982f8e20 Mon Sep 17 00:00:00 2001 From: Tanner Prynn Date: Wed, 24 Feb 2016 17:46:32 -0600 Subject: Update pull request per comments by birkenfeld. Add optional function parameter for the class name to instantiate, and update cli to support this. Move error handling to within the loading functions; they now only raise ClassNotFound. Modify doc with these updates and the version number. Test case clean up and additions. --- tests/support/python_lexer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/support/python_lexer.py') diff --git a/tests/support/python_lexer.py b/tests/support/python_lexer.py index b1367715..f3085748 100644 --- a/tests/support/python_lexer.py +++ b/tests/support/python_lexer.py @@ -17,7 +17,6 @@ from pygments import unistring as uni line_re = re.compile('.*?\n') - class CustomLexer(RegexLexer): """ For `Python `_ source code. @@ -224,3 +223,6 @@ class CustomLexer(RegexLexer): return shebang_matches(text, r'pythonw?(2(\.\d)?)?') or \ 'import ' in text[:1000] + +class LexerWrapper(CustomLexer): + name="PythonLexerWrapper" \ No newline at end of file -- cgit v1.2.1