Patchwork D8807: formatter: inline a variable assigned from `templater.templater.frommapfile`

login
register
mail settings
Submitter phabricator
Date July 24, 2020, 6:03 a.m.
Message ID <differential-rev-PHID-DREV-xnz6zt7tldi4ffuwo5m5-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46860/
State Superseded
Headers show

Comments

phabricator - July 24, 2020, 6:03 a.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The variable doesn't get reused and it doesn't help formatting, so I
  don't see any reason for it.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8807

AFFECTED FILES
  mercurial/formatter.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/formatter.py b/mercurial/formatter.py
--- a/mercurial/formatter.py
+++ b/mercurial/formatter.py
@@ -626,8 +626,7 @@ 
     a map file"""
     assert not (spec.tmpl and spec.mapfile)
     if spec.mapfile:
-        frommapfile = templater.templater.frommapfile
-        return frommapfile(
+        return templater.templater.frommapfile(
             spec.mapfile, defaults=defaults, resources=resources, cache=cache
         )
     return maketemplater(