Patchwork [3,of,7] hgweb: remove unused argument from graphdata() factory

login
register
mail settings
Submitter Yuya Nishihara
Date Feb. 23, 2016, 3:45 p.m.
Message ID <2b7781bbb9d2298913d5.1456242328@mimosa>
Download mbox | patch
Permalink /patch/13315/
State Accepted
Delegated to: Augie Fackler
Headers show

Comments

Yuya Nishihara - Feb. 23, 2016, 3:45 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1451915705 -32400
#      Mon Jan 04 22:55:05 2016 +0900
# Node ID 2b7781bbb9d2298913d5ad351ad3a94137ec23f5
# Parent  0d06e1cd453b1e1b6392c2ee6293251367ebcbf4
hgweb: remove unused argument from graphdata() factory

As graphdata() is wrapped by lambda, there's no reason to pass unused
arguments to it.

Patch

diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
--- a/mercurial/hgweb/webcommands.py
+++ b/mercurial/hgweb/webcommands.py
@@ -1135,7 +1135,7 @@  def graph(web, req, tmpl):
                              max([edge[1] for edge in edges] or [0]))
         return cols
 
-    def graphdata(usetuples, **map):
+    def graphdata(usetuples):
         data = []
 
         row = 0
@@ -1195,8 +1195,8 @@  def graph(web, req, tmpl):
                 canvaswidth=(cols + 1) * bg_height,
                 truecanvasheight=rows * bg_height,
                 canvasheight=canvasheight, bg_height=bg_height,
-                jsdata=lambda **x: graphdata(True, **x),
-                nodes=lambda **x: graphdata(False, **x),
+                jsdata=lambda **x: graphdata(True),
+                nodes=lambda **x: graphdata(False),
                 node=ctx.hex(), changenav=changenav)
 
 def _getdoc(e):