Patchwork [4,of,5] githelp: rewrite a Yoda conditional

login
register
mail settings
Submitter Matt Harbison
Date May 22, 2018, 3:17 a.m.
Message ID <8e4cdc86c55f579eac98.1526959031@Envy>
Download mbox | patch
Permalink /patch/31803/
State Accepted
Headers show

Comments

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

Patch

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:]