diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-03-04 15:54:22 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-03-04 15:54:22 +0000 |
| commit | 703d5ddbc3b7a805e82b4b80d01c8964a50d8a0a (patch) | |
| tree | 6460ac86985f2312227b3c4ca396c3f2ee6652e9 /docutils/utils/code_analyzer.py | |
| parent | 62974fa0f4a5ddc02be8df015511c90dcb00f5e2 (diff) | |
| download | docutils-703d5ddbc3b7a805e82b4b80d01c8964a50d8a0a.tar.gz | |
Ensure at least two spaces before inline comment.
flake 8 rule E261
Exceptions for modules sheduled for removal or with
3rd-party origin and for data collections.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk/docutils@9021 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/utils/code_analyzer.py')
| -rw-r--r-- | docutils/utils/code_analyzer.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docutils/utils/code_analyzer.py b/docutils/utils/code_analyzer.py index 5edc8736f..f0ecc9b71 100644 --- a/docutils/utils/code_analyzer.py +++ b/docutils/utils/code_analyzer.py @@ -16,9 +16,9 @@ except ImportError: with_pygments = False # Filter the following token types from the list of class arguments: -unstyled_tokens = ['token', # Token (base token type) - 'text', # Token.Text - ''] # short name for Token and Text +unstyled_tokens = ['token', # Token (base token type) + 'text', # Token.Text + ''] # short name for Token and Text # (Add, e.g., Token.Punctuation with ``unstyled_tokens += 'punctuation'``.) class LexerError(ApplicationError): @@ -97,9 +97,9 @@ class Lexer: return tokens = pygments.lex(self.code, self.lexer) for tokentype, value in self.merge(tokens): - if self.tokennames == 'long': # long CSS class args + if self.tokennames == 'long': # long CSS class args classes = str(tokentype).lower().split('.') - else: # short CSS class args + else: # short CSS class args classes = [_get_ttype_class(tokentype)] classes = [cls for cls in classes if cls not in unstyled_tokens] yield classes, value |
