Prechádzať zdrojové kódy

command: Add parentheses on wrapped condition

Surround the condition with parentheses rather than using
backslashes. This prevents confusion about indentation when
running flake8/autoflake8.

Change-Id: I01775b96f817ee616f545b55369a4864fa1d6712
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254603
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: David Pursehouse <dpursehouse@collab.net>
David Pursehouse 6 rokov pred
rodič
commit
5a2517f411
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      command.py

+ 3 - 3
command.py

@@ -123,9 +123,9 @@ class Command(object):
     project = None
     if os.path.exists(path):
       oldpath = None
-      while path and \
-            path != oldpath and \
-            path != manifest.topdir:
+      while (path and
+             path != oldpath and
+             path != manifest.topdir):
         try:
           project = self._by_path[path]
           break