diff extensions/revinfo.py @ 114:a51822141ccf

Style: handled some more flake8 warnings: consistent command declaration list formatting
author Franz Glasner <hg@dom66.de>
date Thu, 16 Aug 2018 18:53:11 +0200
parents b3170649d7ab
children fb7e1e4e4d2c
line wrap: on
line diff
--- a/extensions/revinfo.py	Thu Aug 16 18:44:02 2018 +0200
+++ b/extensions/revinfo.py	Thu Aug 16 18:53:11 2018 +0200
@@ -21,13 +21,15 @@
 testedwith = "3.5 3.5.1 3.5.2 4.3.1 4.3.2 4.4.1 4.4.2 4.5.2 4.6.1"
 
 
-@command("revinfo",
-         [("r", "rev", "",  _('revision to handle'), _('REV')),
-          ("", "amend", None, _('amend a given file with path information')),
-          ("p", "path", [], _('the configured default path'), _('SOURCE')),
-          ("d", "data", [], _("add an extra `KEY: VALUE' pair into the file"), _('KEY=VALUE')),
-          ],
-         _("hg revinfo [OPTION]... [DEST]"))
+@command(
+    "revinfo",
+    [
+        ("r", "rev", "",  _('revision to handle'), _('REV')),
+        ("", "amend", None, _('amend a given file with path information')),
+        ("p", "path", [], _('the configured default path'), _('SOURCE')),
+        ("d", "data", [], _("add an extra `KEY: VALUE' pair into the file"), _('KEY=VALUE')),
+    ],
+    _("hg revinfo [OPTION]... [DEST]"))
 def revinfo(ui, repo, dest=None, **opts):
     """write a revision summary
 
@@ -61,7 +63,8 @@
     else:
         ctx = scmutil.revsingle(repo, opts.get("rev"))
         if not ctx:
-            raise error.Abort(_("no working directory: please specify a revision"))
+            raise error.Abort(
+                _("no working directory: please specify a revision"))
 
         msg = archival.buildmetadata(ctx)
 
@@ -70,7 +73,8 @@
         if len(kvparts) == 2:
             msg += "%s: %s\n" % tuple(kvparts)
         else:
-            raise error.Abort(_("given data `%s' is not a KEY=VALUE pair") % (kv, ))
+            raise error.Abort(
+                _("given data `%s' is not a KEY=VALUE pair") % (kv, ))
 
     paths = opts.get("path")
     #