diff mbox series

[v2,21/21] git-p4: seperate multiple statements onto seperate lines

Message ID 20220113134728.23192-22-jholdsworth@nvidia.com (mailing list archive)
State Superseded
Headers show
Series git-p4: Various code tidy-ups | expand

Commit Message

Joel Holdsworth Jan. 13, 2022, 1:47 p.m. UTC
PEP8 discourages the use of compound statements where there are multiple
statements on a single line in the "Other Recommendations" section:

https://www.python.org/dev/peps/pep-0008/#other-recommendations

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
---
 git-p4.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/git-p4.py b/git-p4.py
index 7789989ec7..7cdc98dfa6 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -1264,7 +1264,8 @@  def p4ChangesForPaths(depotPaths, changeRange, requestedBlockSize):
             else:
                 block_size = max(2, block_size // 2)
 
-            if verbose: print("block size error, retrying with block size {0}".format(block_size))
+            if verbose:
+                print("block size error, retrying with block size {0}".format(block_size))
             continue
         except P4Exception as e:
             die('Error retrieving changes description ({0})'.format(e.p4ExitCode))
@@ -1891,7 +1892,9 @@  def modifyChangelistUser(self, changelist, newUser):
                 (changelist, newUser))
 
         c = changes[0]
-        if c['User'] == newUser: return   # nothing to do
+        if c['User'] == newUser:
+            # Nothing to do
+            return
         c['User'] = newUser
         # p4 does not understand format version 3 and above
         input = marshal.dumps(c, 2)