diff options
author | gbrandl <devnull@localhost> | 2007-02-14 18:28:29 +0100 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2007-02-14 18:28:29 +0100 |
commit | 74d67f73e81663e45609d99751353b690a4ac312 (patch) | |
tree | 9036deee060f94fc1113da32955e01a91b7c1666 /pygments | |
parent | af020e969dfdbb6833887e0a088e245e5032f26a (diff) | |
download | pygments-74d67f73e81663e45609d99751353b690a4ac312.tar.gz |
[svn] Make check.
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/cmdline.py | 10 | ||||
-rw-r--r-- | pygments/formatters/__init__.py | 2 | ||||
-rw-r--r-- | pygments/formatters/html.py | 8 | ||||
-rw-r--r-- | pygments/formatters/other.py | 2 | ||||
-rw-r--r-- | pygments/lexers/compiled.py | 8 |
5 files changed, 15 insertions, 15 deletions
diff --git a/pygments/cmdline.py b/pygments/cmdline.py index 3e98af39..84c09b88 100644 --- a/pygments/cmdline.py +++ b/pygments/cmdline.py @@ -144,8 +144,8 @@ def _print_list(what): info = [] for cls in get_all_formatters(): doc = docstring_headline(cls) - tup = (', '.join(cls.aliases) + ':', doc, - cls.filenames and '(filenames ' + ', '.join(cls.filenames) + ')' or '') + tup = (', '.join(cls.aliases) + ':', doc, cls.filenames and + '(filenames ' + ', '.join(cls.filenames) + ')' or '') info.append(tup) info.sort() for i in info: @@ -165,11 +165,11 @@ def _print_list(what): print print "Styles:" print "~~~~~~~" - + for name in get_all_styles(): cls = get_style_by_name(name) print "* " + name + ':' - print " %s" % docstring_headline(cls) + print " %s" % docstring_headline(cls) def main(args): @@ -177,7 +177,7 @@ def main(args): Main command line entry point. """ # pylint: disable-msg=R0911,R0912,R0915 - + usage = USAGE % ((args[0],) * 5) try: diff --git a/pygments/formatters/__init__.py b/pygments/formatters/__init__.py index 8d0feaaa..fb200e10 100644 --- a/pygments/formatters/__init__.py +++ b/pygments/formatters/__init__.py @@ -22,7 +22,7 @@ del fcls __all__ = ['get_formatter_by_name', 'get_formatter_for_filename', 'get_all_formatters'] + [cls.__name__ for cls in FORMATTERS] - + _formatter_alias_cache = {} _formatter_filename_cache = [] diff --git a/pygments/formatters/html.py b/pygments/formatters/html.py index f3257f03..528c981b 100644 --- a/pygments/formatters/html.py +++ b/pygments/formatters/html.py @@ -212,7 +212,7 @@ class HtmlFormatter(Formatter): **Subclassing the HTML formatter** - *New in Pygments 0.7.* + *New in Pygments 0.7.* The HTML formatter is now built in a way that allows easy subclassing, thus customizing the output HTML code. The `format()` method calls @@ -361,7 +361,7 @@ class HtmlFormatter(Formatter): print >>sys.stderr, 'Note: Cannot determine output file name, ' \ 'using current directory as base for the CSS file name' cssfilename = self.cssfile - # write CSS file + # write CSS file try: cf = open(cssfilename, "w") cf.write(CSSFILE_TEMPLATE % @@ -392,7 +392,7 @@ class HtmlFormatter(Formatter): if t: lncount += 1 dummyoutfile.write(line) - + fl = self.linenostart mw = len(str(lncount + fl - 1)) sp = self.linenospecial @@ -480,7 +480,7 @@ class HtmlFormatter(Formatter): line = cspan + parts[-1] lspan = cspan # else we neither have to open a new span nor set lspan - + if line: yield 1, line + (lspan and '</span>') + lsep diff --git a/pygments/formatters/other.py b/pygments/formatters/other.py index d83c77ea..4353c2b2 100644 --- a/pygments/formatters/other.py +++ b/pygments/formatters/other.py @@ -22,7 +22,7 @@ class NullFormatter(Formatter): name = 'Text only' aliases = ['text', 'null'] filenames = ['*.txt'] - + def format(self, tokensource, outfile): enc = self.encoding for ttype, value in tokensource: diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index e986fe89..24a3e68b 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -793,7 +793,7 @@ class OcamlLexer(RegexLexer): *New in Pygments 0.7.* """ - + name = 'OCaml' aliases = ['ocaml'] filenames = ['*.ml', '*.mli'] @@ -836,18 +836,18 @@ class OcamlLexer(RegexLexer): (r'(%s|%s)?%s' % (infix_syms, prefix_syms, operators), Operator), (r"[^\W\d][\w']*", Name), - + (r'\d[\d_]*', Number.Integer), (r'0[xX][\da-fA-F][\da-fA-F_]*', Number.Hex), (r'0[oO][0-7][0-7_]*', Number.Oct), (r'0[bB][01][01_]*', Number), (r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float), - + (r"'(?:(\\[\\\"'ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))'", String.Char), (r"'.'", String.Char), (r"'", Keyword), # a stray quote is another syntax element - + (r'"', String.Double, 'string'), (r'[~?][a-z][\w\']*:', Name.Variable), |