[PATCH 1 of 2] highlight: mandatory arguments where possible

Christian Ebert blacktrash at gmx.net
Wed Dec 12 17:03:32 CST 2007


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1197500394 -3600
# Node ID 347d461bca84f3073c54b0ffefc30967724f4994
# Parent  4d6b630d393953a2ac913232658b3bfb5f05ce93
highlight: mandatory arguments where possible

diff --git a/hgext/highlight.py b/hgext/highlight.py
--- a/hgext/highlight.py
+++ b/hgext/highlight.py
@@ -66,8 +66,7 @@ class StripedHtmlFormatter(HtmlFormatter
         yield 0, "</div>"
 
 
-def pygments_format(filename, rawtext, forcetext=False, stripecount=1,
-                    style='colorful'):
+def pygments_format(filename, rawtext, forcetext, stripecount, style):
     if not forcetext:
         try:
             lexer = guess_lexer_for_filename(filename, rawtext)
@@ -110,10 +109,8 @@ def filerevision_pygments(self, tmpl, fc
 
     style = self.config("web", "pygments_style", "colorful")
 
-    text_formatted = lines(pygments_format(f, text,
-                                           forcetext=forcetext,
-                                           stripecount=self.stripecount,
-                                           style=style))
+    text_formatted = lines(pygments_format(f, text, forcetext,
+                                           self.stripecount, style))
 
     # override per-line template
     tmpl.cache['fileline'] = '#line#'


More information about the Mercurial-devel mailing list