summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2020-09-05 21:12:04 +0200
committerGeorg Brandl <georg@python.org>2020-09-06 20:16:01 +0200
commit5d5e3716e34f57477941a347ee1e6d3d3c78502f (patch)
tree314f89fe86fa5ef7d3e41600018634b8d15bf752
parent0feeea127e98e19e0601af6768c50ebc29b35897 (diff)
downloadpygments-git-5d5e3716e34f57477941a347ee1e6d3d3c78502f.tar.gz
all: use argumentless super()
-rw-r--r--doc/docs/lexerdevelopment.rst2
-rw-r--r--pygments/lexers/asm.py6
-rw-r--r--pygments/lexers/data.py4
-rw-r--r--pygments/lexers/dotnet.py6
-rw-r--r--pygments/lexers/email.py6
-rw-r--r--pygments/lexers/ezhil.py2
-rw-r--r--pygments/lexers/markup.py9
-rw-r--r--pygments/lexers/mime.py2
-rw-r--r--pygments/lexers/parsers.py67
-rw-r--r--pygments/lexers/perl.py2
-rw-r--r--pygments/lexers/slash.py2
-rw-r--r--pygments/lexers/sql.py2
-rw-r--r--pygments/lexers/templates.py124
13 files changed, 82 insertions, 152 deletions
diff --git a/doc/docs/lexerdevelopment.rst b/doc/docs/lexerdevelopment.rst
index 27e5300e..824e0c59 100644
--- a/doc/docs/lexerdevelopment.rst
+++ b/doc/docs/lexerdevelopment.rst
@@ -563,7 +563,7 @@ appropriate positions. ::
class HtmlPhpLexer(DelegatingLexer):
def __init__(self, **options):
- super(HtmlPhpLexer, self).__init__(HtmlLexer, PhpLexer, **options)
+ super().__init__(HtmlLexer, PhpLexer, **options)
This procedure ensures that e.g. HTML with template tags in it is highlighted
correctly even if the template tags are put into HTML tags or attributes.
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py
index bdb48ce2..fa0c3589 100644
--- a/pygments/lexers/asm.py
+++ b/pygments/lexers/asm.py
@@ -178,7 +178,7 @@ class DObjdumpLexer(DelegatingLexer):
mimetypes = ['text/x-d-objdump']
def __init__(self, **options):
- super(DObjdumpLexer, self).__init__(DLexer, ObjdumpLexer, **options)
+ super().__init__(DLexer, ObjdumpLexer, **options)
class CppObjdumpLexer(DelegatingLexer):
@@ -191,7 +191,7 @@ class CppObjdumpLexer(DelegatingLexer):
mimetypes = ['text/x-cpp-objdump']
def __init__(self, **options):
- super(CppObjdumpLexer, self).__init__(CppLexer, ObjdumpLexer, **options)
+ super().__init__(CppLexer, ObjdumpLexer, **options)
class CObjdumpLexer(DelegatingLexer):
@@ -204,7 +204,7 @@ class CObjdumpLexer(DelegatingLexer):
mimetypes = ['text/x-c-objdump']
def __init__(self, **options):
- super(CObjdumpLexer, self).__init__(CLexer, ObjdumpLexer, **options)
+ super().__init__(CLexer, ObjdumpLexer, **options)
class HsailLexer(RegexLexer):
diff --git a/pygments/lexers/data.py b/pygments/lexers/data.py
index fc8897c4..937dfda1 100644
--- a/pygments/lexers/data.py
+++ b/pygments/lexers/data.py
@@ -23,7 +23,7 @@ class YamlLexerContext(LexerContext):
"""Indentation context for the YAML lexer."""
def __init__(self, *args, **kwds):
- super(YamlLexerContext, self).__init__(*args, **kwds)
+ super().__init__(*args, **kwds)
self.indent_stack = []
self.indent = -1
self.next_indent = 0
@@ -433,7 +433,7 @@ class YamlLexer(ExtendedRegexLexer):
def get_tokens_unprocessed(self, text=None, context=None):
if context is None:
context = YamlLexerContext(text, 0)
- return super(YamlLexer, self).get_tokens_unprocessed(text, context)
+ return super().get_tokens_unprocessed(text, context)
class JsonLexer(RegexLexer):
diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py
index 246a5d85..c8635524 100644
--- a/pygments/lexers/dotnet.py
+++ b/pygments/lexers/dotnet.py
@@ -507,8 +507,7 @@ class CSharpAspxLexer(DelegatingLexer):
mimetypes = []
def __init__(self, **options):
- super(CSharpAspxLexer, self).__init__(CSharpLexer, GenericAspxLexer,
- **options)
+ super().__init__(CSharpLexer, GenericAspxLexer, **options)
def analyse_text(text):
if re.search(r'Page\s*Language="C#"', text, re.I) is not None:
@@ -528,8 +527,7 @@ class VbNetAspxLexer(DelegatingLexer):
mimetypes = []
def __init__(self, **options):
- super(VbNetAspxLexer, self).__init__(VbNetLexer, GenericAspxLexer,
- **options)
+ super().__init__(VbNetLexer, GenericAspxLexer, **options)
def analyse_text(text):
if re.search(r'Page\s*Language="Vb"', text, re.I) is not None:
diff --git a/pygments/lexers/email.py b/pygments/lexers/email.py
index 693eb19b..776db88c 100644
--- a/pygments/lexers/email.py
+++ b/pygments/lexers/email.py
@@ -25,7 +25,7 @@ class EmailHeaderLexer(RegexLexer):
"""
def __init__(self, **options):
- super(EmailHeaderLexer, self).__init__(**options)
+ super().__init__(**options)
self.highlight_x = get_bool_opt(options, "highlight-X-header", False)
def get_x_header_tokens(self, match):
@@ -148,6 +148,4 @@ class EmailLexer(DelegatingLexer):
mimetypes = ["message/rfc822"]
def __init__(self, **options):
- super(EmailLexer, self).__init__(
- EmailHeaderLexer, MIMELexer, Comment, **options
- )
+ super().__init__(EmailHeaderLexer, MIMELexer, Comment, **options)
diff --git a/pygments/lexers/ezhil.py b/pygments/lexers/ezhil.py
index e2daf580..37d793dd 100644
--- a/pygments/lexers/ezhil.py
+++ b/pygments/lexers/ezhil.py
@@ -65,5 +65,5 @@ class EzhilLexer(RegexLexer):
}
def __init__(self, **options):
- super(EzhilLexer, self).__init__(**options)
+ super().__init__(**options)
self.encoding = options.get('encoding', 'utf-8')
diff --git a/pygments/lexers/markup.py b/pygments/lexers/markup.py
index 7d2cb1e2..bd814a54 100644
--- a/pygments/lexers/markup.py
+++ b/pygments/lexers/markup.py
@@ -461,8 +461,7 @@ class MozPreprocXulLexer(DelegatingLexer):
mimetypes = []
def __init__(self, **options):
- super(MozPreprocXulLexer, self).__init__(
- XmlLexer, MozPreprocHashLexer, **options)
+ super().__init__(XmlLexer, MozPreprocHashLexer, **options)
class MozPreprocJavascriptLexer(DelegatingLexer):
@@ -478,8 +477,7 @@ class MozPreprocJavascriptLexer(DelegatingLexer):
mimetypes = []
def __init__(self, **options):
- super(MozPreprocJavascriptLexer, self).__init__(
- JavascriptLexer, MozPreprocHashLexer, **options)
+ super().__init__(JavascriptLexer, MozPreprocHashLexer, **options)
class MozPreprocCssLexer(DelegatingLexer):
@@ -495,8 +493,7 @@ class MozPreprocCssLexer(DelegatingLexer):
mimetypes = []
def __init__(self, **options):
- super(MozPreprocCssLexer, self).__init__(
- CssLexer, MozPreprocPercentLexer, **options)
+ super().__init__(CssLexer, MozPreprocPercentLexer, **options)
class MarkdownLexer(RegexLexer):
diff --git a/pygments/lexers/mime.py b/pygments/lexers/mime.py
index e67b3f36..f5bae8bd 100644
--- a/pygments/lexers/mime.py
+++ b/pygments/lexers/mime.py
@@ -58,7 +58,7 @@ class MIMELexer(RegexLexer):
"multipart/alternative"]
def __init__(self, **options):
- super(MIMELexer, self).__init__(**options)
+ super().__init__(**options)
self.boundary = options.get("Multipart-Boundary")
self.content_transfer_encoding = options.get("Content_Transfer_Encoding")
self.content_type = options.get("Content_Type", "text/plain")
diff --git a/pygments/lexers/parsers.py b/pygments/lexers/parsers.py
index e92a060f..13a3a83c 100644
--- a/pygments/lexers/parsers.py
+++ b/pygments/lexers/parsers.py
@@ -28,7 +28,6 @@ __all__ = ['RagelLexer', 'RagelEmbeddedLexer', 'RagelCLexer', 'RagelDLexer',
'RagelCppLexer', 'RagelObjectiveCLexer', 'RagelRubyLexer',
'RagelJavaLexer', 'AntlrLexer', 'AntlrPythonLexer',
'AntlrPerlLexer', 'AntlrRubyLexer', 'AntlrCppLexer',
- # 'AntlrCLexer',
'AntlrCSharpLexer', 'AntlrObjectiveCLexer',
'AntlrJavaLexer', 'AntlrActionScriptLexer',
'TreetopLexer', 'EbnfLexer']
@@ -222,8 +221,7 @@ class RagelRubyLexer(DelegatingLexer):
filenames = ['*.rl']
def __init__(self, **options):
- super(RagelRubyLexer, self).__init__(RubyLexer, RagelEmbeddedLexer,
- **options)
+ super().__init__(RubyLexer, RagelEmbeddedLexer, **options)
def analyse_text(text):
return '@LANG: ruby' in text
@@ -241,8 +239,7 @@ class RagelCLexer(DelegatingLexer):
filenames = ['*.rl']
def __init__(self, **options):
- super(RagelCLexer, self).__init__(CLexer, RagelEmbeddedLexer,
- **options)
+ super().__init__(CLexer, RagelEmbeddedLexer, **options)
def analyse_text(text):
return '@LANG: c' in text
@@ -260,7 +257,7 @@ class RagelDLexer(DelegatingLexer):
filenames = ['*.rl']
def __init__(self, **options):
- super(RagelDLexer, self).__init__(DLexer, RagelEmbeddedLexer, **options)
+ super().__init__(DLexer, RagelEmbeddedLexer, **options)
def analyse_text(text):
return '@LANG: d' in text
@@ -278,7 +275,7 @@ class RagelCppLexer(DelegatingLexer):
filenames = ['*.rl']
def __init__(self, **options):
- super(RagelCppLexer, self).__init__(CppLexer, RagelEmbeddedLexer, **options)
+ super().__init__(CppLexer, RagelEmbeddedLexer, **options)
def analyse_text(text):
return '@LANG: c++' in text
@@ -296,9 +293,7 @@ class RagelObjectiveCLexer(DelegatingLexer):
filenames = ['*.rl']
def __init__(self, **options):
- super(RagelObjectiveCLexer, self).__init__(ObjectiveCLexer,
- RagelEmbeddedLexer,
- **options)
+ super().__init__(ObjectiveCLexer, RagelEmbeddedLexer, **options)
def analyse_text(text):
return '@LANG: objc' in text
@@ -316,8 +311,7 @@ class RagelJavaLexer(DelegatingLexer):
filenames = ['*.rl']
def __init__(self, **options):
- super(RagelJavaLexer, self).__init__(JavaLexer, RagelEmbeddedLexer,
- **options)
+ super().__init__(JavaLexer, RagelEmbeddedLexer, **options)
def analyse_text(text):
return '@LANG: java' in text
@@ -515,30 +509,8 @@ class AntlrLexer(RegexLexer):
def analyse_text(text):
return re.search(r'^\s*grammar\s+[a-zA-Z0-9]+\s*;', text, re.M)
-# http://www.antlr.org/wiki/display/ANTLR3/Code+Generation+Targets
-
-# TH: I'm not aware of any language features of C++ that will cause
-# incorrect lexing of C files. Antlr doesn't appear to make a distinction,
-# so just assume they're C++. No idea how to make Objective C work in the
-# future.
-
-# class AntlrCLexer(DelegatingLexer):
-# """
-# ANTLR with C Target
-#
-# .. versionadded:: 1.1
-# """
-#
-# name = 'ANTLR With C Target'
-# aliases = ['antlr-c']
-# filenames = ['*.G', '*.g']
-#
-# def __init__(self, **options):
-# super(AntlrCLexer, self).__init__(CLexer, AntlrLexer, **options)
-#
-# def analyse_text(text):
-# return re.match(r'^\s*language\s*=\s*C\s*;', text)
+# http://www.antlr.org/wiki/display/ANTLR3/Code+Generation+Targets
class AntlrCppLexer(DelegatingLexer):
"""
@@ -552,7 +524,7 @@ class AntlrCppLexer(DelegatingLexer):
filenames = ['*.G', '*.g']
def __init__(self, **options):
- super(AntlrCppLexer, self).__init__(CppLexer, AntlrLexer, **options)
+ super().__init__(CppLexer, AntlrLexer, **options)
def analyse_text(text):
return AntlrLexer.analyse_text(text) and \
@@ -571,8 +543,7 @@ class AntlrObjectiveCLexer(DelegatingLexer):
filenames = ['*.G', '*.g']
def __init__(self, **options):
- super(AntlrObjectiveCLexer, self).__init__(ObjectiveCLexer,
- AntlrLexer, **options)
+ super().__init__(ObjectiveCLexer, AntlrLexer, **options)
def analyse_text(text):
return AntlrLexer.analyse_text(text) and \
@@ -591,8 +562,7 @@ class AntlrCSharpLexer(DelegatingLexer):
filenames = ['*.G', '*.g']
def __init__(self, **options):
- super(AntlrCSharpLexer, self).__init__(CSharpLexer, AntlrLexer,
- **options)
+ super().__init__(CSharpLexer, AntlrLexer, **options)
def analyse_text(text):
return AntlrLexer.analyse_text(text) and \
@@ -611,8 +581,7 @@ class AntlrPythonLexer(DelegatingLexer):
filenames = ['*.G', '*.g']
def __init__(self, **options):
- super(AntlrPythonLexer, self).__init__(PythonLexer, AntlrLexer,
- **options)
+ super().__init__(PythonLexer, AntlrLexer, **options)
def analyse_text(text):
return AntlrLexer.analyse_text(text) and \
@@ -631,8 +600,7 @@ class AntlrJavaLexer(DelegatingLexer):
filenames = ['*.G', '*.g']
def __init__(self, **options):
- super(AntlrJavaLexer, self).__init__(JavaLexer, AntlrLexer,
- **options)
+ super().__init__(JavaLexer, AntlrLexer, **options)
def analyse_text(text):
# Antlr language is Java by default
@@ -651,8 +619,7 @@ class AntlrRubyLexer(DelegatingLexer):
filenames = ['*.G', '*.g']
def __init__(self, **options):
- super(AntlrRubyLexer, self).__init__(RubyLexer, AntlrLexer,
- **options)
+ super().__init__(RubyLexer, AntlrLexer, **options)
def analyse_text(text):
return AntlrLexer.analyse_text(text) and \
@@ -671,8 +638,7 @@ class AntlrPerlLexer(DelegatingLexer):
filenames = ['*.G', '*.g']
def __init__(self, **options):
- super(AntlrPerlLexer, self).__init__(PerlLexer, AntlrLexer,
- **options)
+ super().__init__(PerlLexer, AntlrLexer, **options)
def analyse_text(text):
return AntlrLexer.analyse_text(text) and \
@@ -692,8 +658,7 @@ class AntlrActionScriptLexer(DelegatingLexer):
def __init__(self, **options):
from pygments.lexers.actionscript import ActionScriptLexer
- super(AntlrActionScriptLexer, self).__init__(ActionScriptLexer,
- AntlrLexer, **options)
+ super().__init__(ActionScriptLexer, AntlrLexer, **options)
def analyse_text(text):
return AntlrLexer.analyse_text(text) and \
@@ -781,7 +746,7 @@ class TreetopLexer(DelegatingLexer):
filenames = ['*.treetop', '*.tt']
def __init__(self, **options):
- super(TreetopLexer, self).__init__(RubyLexer, TreetopBaseLexer, **options)
+ super().__init__(RubyLexer, TreetopBaseLexer, **options)
class EbnfLexer(RegexLexer):
diff --git a/pygments/lexers/perl.py b/pygments/lexers/perl.py
index 0f278eec..4a3ca300 100644
--- a/pygments/lexers/perl.py
+++ b/pygments/lexers/perl.py
@@ -714,5 +714,5 @@ class Perl6Lexer(ExtendedRegexLexer):
return rating
def __init__(self, **options):
- super(Perl6Lexer, self).__init__(**options)
+ super().__init__(**options)
self.encoding = options.get('encoding', 'utf-8')
diff --git a/pygments/lexers/slash.py b/pygments/lexers/slash.py
index 8b5678fe..8c9d53d2 100644
--- a/pygments/lexers/slash.py
+++ b/pygments/lexers/slash.py
@@ -182,4 +182,4 @@ class SlashLexer(DelegatingLexer):
def __init__(self, **options):
from pygments.lexers.web import HtmlLexer
- super(SlashLexer, self).__init__(HtmlLexer, SlashLanguageLexer, **options)
+ super().__init__(HtmlLexer, SlashLanguageLexer, **options)
diff --git a/pygments/lexers/sql.py b/pygments/lexers/sql.py
index d6e4509c..62459bf8 100644
--- a/pygments/lexers/sql.py
+++ b/pygments/lexers/sql.py
@@ -124,7 +124,7 @@ class PostgresBase:
def get_tokens_unprocessed(self, text, *args):
# Have a copy of the entire text to be used by `language_callback`.
self.text = text
- yield from super(PostgresBase, self).get_tokens_unprocessed(text, *args)
+ yield from super().get_tokens_unprocessed(text, *args)
def _get_lexer(self, lang):
if lang.lower() == 'sql':
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py
index f1ffb38b..accd1f71 100644
--- a/pygments/lexers/templates.py
+++ b/pygments/lexers/templates.py
@@ -293,8 +293,7 @@ class VelocityHtmlLexer(DelegatingLexer):
mimetypes = ['text/html+velocity']
def __init__(self, **options):
- super(VelocityHtmlLexer, self).__init__(HtmlLexer, VelocityLexer,
- **options)
+ super().__init__(HtmlLexer, VelocityLexer, **options)
class VelocityXmlLexer(DelegatingLexer):
@@ -310,8 +309,7 @@ class VelocityXmlLexer(DelegatingLexer):
mimetypes = ['application/xml+velocity']
def __init__(self, **options):
- super(VelocityXmlLexer, self).__init__(XmlLexer, VelocityLexer,
- **options)
+ super().__init__(XmlLexer, VelocityLexer, **options)
def analyse_text(text):
rv = VelocityLexer.analyse_text(text) - 0.01
@@ -464,8 +462,7 @@ class MyghtyHtmlLexer(DelegatingLexer):
mimetypes = ['text/html+myghty']
def __init__(self, **options):
- super(MyghtyHtmlLexer, self).__init__(HtmlLexer, MyghtyLexer,
- **options)
+ super().__init__(HtmlLexer, MyghtyLexer, **options)
class MyghtyXmlLexer(DelegatingLexer):
@@ -481,8 +478,7 @@ class MyghtyXmlLexer(DelegatingLexer):
mimetypes = ['application/xml+myghty']
def __init__(self, **options):
- super(MyghtyXmlLexer, self).__init__(XmlLexer, MyghtyLexer,
- **options)
+ super().__init__(XmlLexer, MyghtyLexer, **options)
class MyghtyJavascriptLexer(DelegatingLexer):
@@ -500,8 +496,7 @@ class MyghtyJavascriptLexer(DelegatingLexer):
'text/javascript+mygthy']
def __init__(self, **options):
- super(MyghtyJavascriptLexer, self).__init__(JavascriptLexer,
- MyghtyLexer, **options)
+ super().__init__(JavascriptLexer, MyghtyLexer, **options)
class MyghtyCssLexer(DelegatingLexer):
@@ -517,8 +512,7 @@ class MyghtyCssLexer(DelegatingLexer):
mimetypes = ['text/css+myghty']
def __init__(self, **options):
- super(MyghtyCssLexer, self).__init__(CssLexer, MyghtyLexer,
- **options)
+ super().__init__(CssLexer, MyghtyLexer, **options)
class MasonLexer(RegexLexer):
@@ -659,8 +653,7 @@ class MakoHtmlLexer(DelegatingLexer):
mimetypes = ['text/html+mako']
def __init__(self, **options):
- super(MakoHtmlLexer, self).__init__(HtmlLexer, MakoLexer,
- **options)
+ super().__init__(HtmlLexer, MakoLexer, **options)
class MakoXmlLexer(DelegatingLexer):
@@ -676,8 +669,7 @@ class MakoXmlLexer(DelegatingLexer):
mimetypes = ['application/xml+mako']
def __init__(self, **options):
- super(MakoXmlLexer, self).__init__(XmlLexer, MakoLexer,
- **options)
+ super().__init__(XmlLexer, MakoLexer, **options)
class MakoJavascriptLexer(DelegatingLexer):
@@ -695,8 +687,7 @@ class MakoJavascriptLexer(DelegatingLexer):
'text/javascript+mako']
def __init__(self, **options):
- super(MakoJavascriptLexer, self).__init__(JavascriptLexer,
- MakoLexer, **options)
+ super().__init__(JavascriptLexer, MakoLexer, **options)
class MakoCssLexer(DelegatingLexer):
@@ -712,8 +703,7 @@ class MakoCssLexer(DelegatingLexer):
mimetypes = ['text/css+mako']
def __init__(self, **options):
- super(MakoCssLexer, self).__init__(CssLexer, MakoLexer,
- **options)
+ super().__init__(CssLexer, MakoLexer, **options)
# Genshi and Cheetah lexers courtesy of Matt Good.
@@ -786,8 +776,7 @@ class CheetahHtmlLexer(DelegatingLexer):
mimetypes = ['text/html+cheetah', 'text/html+spitfire']
def __init__(self, **options):
- super(CheetahHtmlLexer, self).__init__(HtmlLexer, CheetahLexer,
- **options)
+ super().__init__(HtmlLexer, CheetahLexer, **options)
class CheetahXmlLexer(DelegatingLexer):
@@ -801,8 +790,7 @@ class CheetahXmlLexer(DelegatingLexer):
mimetypes = ['application/xml+cheetah', 'application/xml+spitfire']
def __init__(self, **options):
- super(CheetahXmlLexer, self).__init__(XmlLexer, CheetahLexer,
- **options)
+ super().__init__(XmlLexer, CheetahLexer, **options)
class CheetahJavascriptLexer(DelegatingLexer):
@@ -822,8 +810,7 @@ class CheetahJavascriptLexer(DelegatingLexer):
'text/javascript+spitfire']
def __init__(self, **options):
- super(CheetahJavascriptLexer, self).__init__(JavascriptLexer,
- CheetahLexer, **options)
+ super().__init__(JavascriptLexer, CheetahLexer, **options)
class GenshiTextLexer(RegexLexer):
@@ -937,8 +924,7 @@ class HtmlGenshiLexer(DelegatingLexer):
mimetypes = ['text/html+genshi']
def __init__(self, **options):
- super(HtmlGenshiLexer, self).__init__(HtmlLexer, GenshiMarkupLexer,
- **options)
+ super().__init__(HtmlLexer, GenshiMarkupLexer, **options)
def analyse_text(text):
rv = 0.0
@@ -962,8 +948,7 @@ class GenshiLexer(DelegatingLexer):
mimetypes = ['application/x-genshi', 'application/x-kid']
def __init__(self, **options):
- super(GenshiLexer, self).__init__(XmlLexer, GenshiMarkupLexer,
- **options)
+ super().__init__(XmlLexer, GenshiMarkupLexer, **options)
def analyse_text(text):
rv = 0.0
@@ -988,9 +973,7 @@ class JavascriptGenshiLexer(DelegatingLexer):
'text/javascript+genshi']
def __init__(self, **options):
- super(JavascriptGenshiLexer, self).__init__(JavascriptLexer,
- GenshiTextLexer,
- **options)
+ super().__init__(JavascriptLexer, GenshiTextLexer, **options)
def analyse_text(text):
return GenshiLexer.analyse_text(text) - 0.05
@@ -1007,8 +990,7 @@ class CssGenshiLexer(DelegatingLexer):
mimetypes = ['text/css+genshi']
def __init__(self, **options):
- super(CssGenshiLexer, self).__init__(CssLexer, GenshiTextLexer,
- **options)
+ super().__init__(CssLexer, GenshiTextLexer, **options)
def analyse_text(text):
return GenshiLexer.analyse_text(text) - 0.05
@@ -1029,7 +1011,7 @@ class RhtmlLexer(DelegatingLexer):
mimetypes = ['text/html+ruby']
def __init__(self, **options):
- super(RhtmlLexer, self).__init__(HtmlLexer, ErbLexer, **options)
+ super().__init__(HtmlLexer, ErbLexer, **options)
def analyse_text(text):
rv = ErbLexer.analyse_text(text) - 0.01
@@ -1051,7 +1033,7 @@ class XmlErbLexer(DelegatingLexer):
mimetypes = ['application/xml+ruby']
def __init__(self, **options):
- super(XmlErbLexer, self).__init__(XmlLexer, ErbLexer, **options)
+ super().__init__(XmlLexer, ErbLexer, **options)
def analyse_text(text):
rv = ErbLexer.analyse_text(text) - 0.01
@@ -1071,7 +1053,7 @@ class CssErbLexer(DelegatingLexer):
mimetypes = ['text/css+ruby']
def __init__(self, **options):
- super(CssErbLexer, self).__init__(CssLexer, ErbLexer, **options)
+ super().__init__(CssLexer, ErbLexer, **options)
def analyse_text(text):
return ErbLexer.analyse_text(text) - 0.05
@@ -1091,8 +1073,7 @@ class JavascriptErbLexer(DelegatingLexer):
'text/javascript+ruby']
def __init__(self, **options):
- super(JavascriptErbLexer, self).__init__(JavascriptLexer, ErbLexer,
- **options)
+ super().__init__(JavascriptLexer, ErbLexer, **options)
def analyse_text(text):
return ErbLexer.analyse_text(text) - 0.05
@@ -1115,7 +1096,7 @@ class HtmlPhpLexer(DelegatingLexer):
'application/x-httpd-php4', 'application/x-httpd-php5']
def __init__(self, **options):
- super(HtmlPhpLexer, self).__init__(HtmlLexer, PhpLexer, **options)
+ super().__init__(HtmlLexer, PhpLexer, **options)
def analyse_text(text):
rv = PhpLexer.analyse_text(text) - 0.01
@@ -1135,7 +1116,7 @@ class XmlPhpLexer(DelegatingLexer):
mimetypes = ['application/xml+php']
def __init__(self, **options):
- super(XmlPhpLexer, self).__init__(XmlLexer, PhpLexer, **options)
+ super().__init__(XmlLexer, PhpLexer, **options)
def analyse_text(text):
rv = PhpLexer.analyse_text(text) - 0.01
@@ -1155,7 +1136,7 @@ class CssPhpLexer(DelegatingLexer):
mimetypes = ['text/css+php']
def __init__(self, **options):
- super(CssPhpLexer, self).__init__(CssLexer, PhpLexer, **options)
+ super().__init__(CssLexer, PhpLexer, **options)
def analyse_text(text):
return PhpLexer.analyse_text(text) - 0.05
@@ -1175,8 +1156,7 @@ class JavascriptPhpLexer(DelegatingLexer):
'text/javascript+php']
def __init__(self, **options):
- super(JavascriptPhpLexer, self).__init__(JavascriptLexer, PhpLexer,
- **options)
+ super().__init__(JavascriptLexer, PhpLexer, **options)
def analyse_text(text):
return PhpLexer.analyse_text(text)
@@ -1196,7 +1176,7 @@ class HtmlSmartyLexer(DelegatingLexer):
mimetypes = ['text/html+smarty']
def __init__(self, **options):
- super(HtmlSmartyLexer, self).__init__(HtmlLexer, SmartyLexer, **options)
+ super().__init__(HtmlLexer, SmartyLexer, **options)
def analyse_text(text):
rv = SmartyLexer.analyse_text(text) - 0.01
@@ -1217,7 +1197,7 @@ class XmlSmartyLexer(DelegatingLexer):
mimetypes = ['application/xml+smarty']
def __init__(self, **options):
- super(XmlSmartyLexer, self).__init__(XmlLexer, SmartyLexer, **options)
+ super().__init__(XmlLexer, SmartyLexer, **options)
def analyse_text(text):
rv = SmartyLexer.analyse_text(text) - 0.01
@@ -1238,7 +1218,7 @@ class CssSmartyLexer(DelegatingLexer):
mimetypes = ['text/css+smarty']
def __init__(self, **options):
- super(CssSmartyLexer, self).__init__(CssLexer, SmartyLexer, **options)
+ super().__init__(CssLexer, SmartyLexer, **options)
def analyse_text(text):
return SmartyLexer.analyse_text(text) - 0.05
@@ -1258,8 +1238,7 @@ class JavascriptSmartyLexer(DelegatingLexer):
'text/javascript+smarty']
def __init__(self, **options):
- super(JavascriptSmartyLexer, self).__init__(JavascriptLexer, SmartyLexer,
- **options)
+ super().__init__(JavascriptLexer, SmartyLexer, **options)
def analyse_text(text):
return SmartyLexer.analyse_text(text) - 0.05
@@ -1279,7 +1258,7 @@ class HtmlDjangoLexer(DelegatingLexer):
mimetypes = ['text/html+django', 'text/html+jinja']
def __init__(self, **options):
- super(HtmlDjangoLexer, self).__init__(HtmlLexer, DjangoLexer, **options)
+ super().__init__(HtmlLexer, DjangoLexer, **options)
def analyse_text(text):
rv = DjangoLexer.analyse_text(text) - 0.01
@@ -1300,7 +1279,7 @@ class XmlDjangoLexer(DelegatingLexer):
mimetypes = ['application/xml+django', 'application/xml+jinja']
def __init__(self, **options):
- super(XmlDjangoLexer, self).__init__(XmlLexer, DjangoLexer, **options)
+ super().__init__(XmlLexer, DjangoLexer, **options)
def analyse_text(text):
rv = DjangoLexer.analyse_text(text) - 0.01
@@ -1321,7 +1300,7 @@ class CssDjangoLexer(DelegatingLexer):
mimetypes = ['text/css+django', 'text/css+jinja']
def __init__(self, **options):
- super(CssDjangoLexer, self).__init__(CssLexer, DjangoLexer, **options)
+ super().__init__(CssLexer, DjangoLexer, **options)
def analyse_text(text):
return DjangoLexer.analyse_text(text) - 0.05
@@ -1345,8 +1324,7 @@ class JavascriptDjangoLexer(DelegatingLexer):
'text/javascript+jinja']
def __init__(self, **options):
- super(JavascriptDjangoLexer, self).__init__(JavascriptLexer, DjangoLexer,
- **options)
+ super().__init__(JavascriptLexer, DjangoLexer, **options)
def analyse_text(text):
return DjangoLexer.analyse_text(text) - 0.05
@@ -1389,7 +1367,7 @@ class JspLexer(DelegatingLexer):
mimetypes = ['application/x-jsp']
def __init__(self, **options):
- super(JspLexer, self).__init__(XmlLexer, JspRootLexer, **options)
+ super().__init__(XmlLexer, JspRootLexer, **options)
def analyse_text(text):
rv = JavaLexer.analyse_text(text) - 0.01
@@ -1466,8 +1444,7 @@ class EvoqueHtmlLexer(DelegatingLexer):
mimetypes = ['text/html+evoque']
def __init__(self, **options):
- super(EvoqueHtmlLexer, self).__init__(HtmlLexer, EvoqueLexer,
- **options)
+ super().__init__(HtmlLexer, EvoqueLexer, **options)
class EvoqueXmlLexer(DelegatingLexer):
@@ -1483,8 +1460,7 @@ class EvoqueXmlLexer(DelegatingLexer):
mimetypes = ['application/xml+evoque']
def __init__(self, **options):
- super(EvoqueXmlLexer, self).__init__(XmlLexer, EvoqueLexer,
- **options)
+ super().__init__(XmlLexer, EvoqueLexer, **options)
class ColdfusionLexer(RegexLexer):
@@ -1591,8 +1567,7 @@ class ColdfusionHtmlLexer(DelegatingLexer):
mimetypes = ['application/x-coldfusion']
def __init__(self, **options):
- super(ColdfusionHtmlLexer, self).__init__(HtmlLexer, ColdfusionMarkupLexer,
- **options)
+ super().__init__(HtmlLexer, ColdfusionMarkupLexer, **options)
class ColdfusionCFCLexer(DelegatingLexer):
@@ -1607,8 +1582,7 @@ class ColdfusionCFCLexer(DelegatingLexer):
mimetypes = []
def __init__(self, **options):
- super(ColdfusionCFCLexer, self).__init__(ColdfusionHtmlLexer, ColdfusionLexer,
- **options)
+ super().__init__(ColdfusionHtmlLexer, ColdfusionLexer, **options)
class SspLexer(DelegatingLexer):
@@ -1623,7 +1597,7 @@ class SspLexer(DelegatingLexer):
mimetypes = ['application/x-ssp']
def __init__(self, **options):
- super(SspLexer, self).__init__(XmlLexer, JspRootLexer, **options)
+ super().__init__(XmlLexer, JspRootLexer, **options)
def analyse_text(text):
rv = 0.0
@@ -1670,8 +1644,7 @@ class TeaTemplateLexer(DelegatingLexer):
mimetypes = ['text/x-tea']
def __init__(self, **options):
- super(TeaTemplateLexer, self).__init__(XmlLexer,
- TeaTemplateRootLexer, **options)
+ super().__init__(XmlLexer, TeaTemplateRootLexer, **options)
def analyse_text(text):
rv = TeaLangLexer.analyse_text(text) - 0.01
@@ -1701,7 +1674,7 @@ class LassoHtmlLexer(DelegatingLexer):
'application/x-httpd-lasso[89]']
def __init__(self, **options):
- super(LassoHtmlLexer, self).__init__(HtmlLexer, LassoLexer, **options)
+ super().__init__(HtmlLexer, LassoLexer, **options)
def analyse_text(text):
rv = LassoLexer.analyse_text(text) - 0.01
@@ -1725,7 +1698,7 @@ class LassoXmlLexer(DelegatingLexer):
mimetypes = ['application/xml+lasso']
def __init__(self, **options):
- super(LassoXmlLexer, self).__init__(XmlLexer, LassoLexer, **options)
+ super().__init__(XmlLexer, LassoLexer, **options)
def analyse_text(text):
rv = LassoLexer.analyse_text(text) - 0.01
@@ -1749,7 +1722,7 @@ class LassoCssLexer(DelegatingLexer):
def __init__(self, **options):
options['requiredelimiters'] = True
- super(LassoCssLexer, self).__init__(CssLexer, LassoLexer, **options)
+ super().__init__(CssLexer, LassoLexer, **options)
def analyse_text(text):
rv = LassoLexer.analyse_text(text) - 0.05
@@ -1777,8 +1750,7 @@ class LassoJavascriptLexer(DelegatingLexer):
def __init__(self, **options):
options['requiredelimiters'] = True
- super(LassoJavascriptLexer, self).__init__(JavascriptLexer, LassoLexer,
- **options)
+ super().__init__(JavascriptLexer, LassoLexer, **options)
def analyse_text(text):
rv = LassoLexer.analyse_text(text) - 0.05
@@ -1875,7 +1847,7 @@ class HandlebarsHtmlLexer(DelegatingLexer):
mimetypes = ['text/html+handlebars', 'text/x-handlebars-template']
def __init__(self, **options):
- super(HandlebarsHtmlLexer, self).__init__(HtmlLexer, HandlebarsLexer, **options)
+ super().__init__(HtmlLexer, HandlebarsLexer, **options)
class YamlJinjaLexer(DelegatingLexer):
@@ -1894,7 +1866,7 @@ class YamlJinjaLexer(DelegatingLexer):
mimetypes = ['text/x-yaml+jinja', 'text/x-sls']
def __init__(self, **options):
- super(YamlJinjaLexer, self).__init__(YamlLexer, DjangoLexer, **options)
+ super().__init__(YamlLexer, DjangoLexer, **options)
class LiquidLexer(RegexLexer):
@@ -2200,7 +2172,7 @@ class TwigHtmlLexer(DelegatingLexer):
mimetypes = ['text/html+twig']
def __init__(self, **options):
- super(TwigHtmlLexer, self).__init__(HtmlLexer, TwigLexer, **options)
+ super().__init__(HtmlLexer, TwigLexer, **options)
class Angular2Lexer(RegexLexer):
@@ -2280,4 +2252,4 @@ class Angular2HtmlLexer(DelegatingLexer):
filenames = ['*.ng2']
def __init__(self, **options):
- super(Angular2HtmlLexer, self).__init__(HtmlLexer, Angular2Lexer, **options)
+ super().__init__(HtmlLexer, Angular2Lexer, **options)