[PATCH 4 of 5] githelp: rewrite a Yoda conditional

Matt Harbison mharbison72 at gmail.com
Mon May 21 23:17:11 EDT 2018


# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1526957825 14400
#      Mon May 21 22:57:05 2018 -0400
# Node ID 8e4cdc86c55f579eac9887bd2bd09a5867232d32
# Parent  d00bfbf24df05e8b8e21acf1444ea24f265a6123
githelp: rewrite a Yoda conditional

diff --git a/hgext/githelp.py b/hgext/githelp.py
--- a/hgext/githelp.py
+++ b/hgext/githelp.py
@@ -962,7 +962,7 @@ def svn(ui, repo, *args, **kwargs):
     if not args:
         raise error.Abort(_('missing svn command'))
     svncmd = args[0]
-    if not svncmd in gitsvncommands:
+    if svncmd not in gitsvncommands:
         raise error.Abort(_('unknown git svn command "%s"') % (svncmd))
 
     args = args[1:]


More information about the Mercurial-devel mailing list