# HG changeset patch # User Christian Ebert # Date 2007-12-12 13:36:34 # Node ID 831e34e17f4f33ffc5073aa42d1bb81eb61885e2 # Parent 1b35bc1c19688248b90a617d1a4d3ef05ef022d6 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, "" -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#'