Patchwork [4,of,8,V2] registrar: unindent superfluous "if True" block

login
register
mail settings
Submitter Yuya Nishihara
Date May 19, 2017, 3:25 p.m.
Message ID <20915a6569f9e28fd033.1495207514@mimosa>
Download mbox | patch
Permalink /patch/20723/
State Accepted
Headers show

Comments

Yuya Nishihara - May 19, 2017, 3:25 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1494249296 -32400
#      Mon May 08 22:14:56 2017 +0900
# Node ID 20915a6569f9e28fd033dd21c0267deaaafdcaee
# Parent  3317964fa88c21a59e7181228773f63ac27480eb
registrar: unindent superfluous "if True" block

Patch

diff --git a/mercurial/registrar.py b/mercurial/registrar.py
--- a/mercurial/registrar.py
+++ b/mercurial/registrar.py
@@ -128,15 +128,14 @@  class command(_funcregistrarbase):
 
     def _doregister(self, func, name, options=(), synopsis=None,
                     norepo=False, optionalrepo=False, inferrepo=False):
-        if True:
-            func.norepo = norepo
-            func.optionalrepo = optionalrepo
-            func.inferrepo = inferrepo
-            if synopsis:
-                self._table[name] = func, list(options), synopsis
-            else:
-                self._table[name] = func, list(options)
-            return func
+        func.norepo = norepo
+        func.optionalrepo = optionalrepo
+        func.inferrepo = inferrepo
+        if synopsis:
+            self._table[name] = func, list(options), synopsis
+        else:
+            self._table[name] = func, list(options)
+        return func
 
 class revsetpredicate(_funcregistrarbase):
     """Decorator to register revset predicate