diff options
author | Tim Hatch <tim@timhatch.com> | 2015-10-14 12:08:43 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2015-10-14 12:08:43 -0700 |
commit | 96990f584f1e14c9c68b96c967b9f31f34ef33bb (patch) | |
tree | 25c9760b29e56e186d91766d6803c324c313db93 /pygments/lexer.py | |
parent | 697b7a780f5b3312bc27728a095c6eecd4907d5b (diff) | |
download | pygments-96990f584f1e14c9c68b96c967b9f31f34ef33bb.tar.gz |
Fixes noted by pylint, mostly.
Diffstat (limited to 'pygments/lexer.py')
-rw-r--r-- | pygments/lexer.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pygments/lexer.py b/pygments/lexer.py index 581508b0..e846890e 100644 --- a/pygments/lexer.py +++ b/pygments/lexer.py @@ -42,10 +42,10 @@ class LexerMeta(type): static methods which always return float values. """ - def __new__(cls, name, bases, d): + def __new__(mcs, name, bases, d): if 'analyse_text' in d: d['analyse_text'] = make_analysator(d['analyse_text']) - return type.__new__(cls, name, bases, d) + return type.__new__(mcs, name, bases, d) @add_metaclass(LexerMeta) @@ -188,7 +188,7 @@ class Lexer(object): text += '\n' def streamer(): - for i, t, v in self.get_tokens_unprocessed(text): + for _, t, v in self.get_tokens_unprocessed(text): yield t, v stream = streamer() if not unfiltered: @@ -245,7 +245,7 @@ class DelegatingLexer(Lexer): # -class include(str): +class include(str): # pylint: disable=invalid-name """ Indicates that a state should include rules from another state. """ @@ -259,10 +259,10 @@ class _inherit(object): def __repr__(self): return 'inherit' -inherit = _inherit() +inherit = _inherit() # pylint: disable=invalid-name -class combined(tuple): +class combined(tuple): # pylint: disable=invalid-name """ Indicates a state combined from multiple states. """ @@ -319,8 +319,8 @@ def bygroups(*args): if data is not None: if ctx: ctx.pos = match.start(i + 1) - for item in action(lexer, _PseudoMatch(match.start(i + 1), - data), ctx): + for item in action( + lexer, _PseudoMatch(match.start(i + 1), data), ctx): if item: yield item if ctx: |