PEP8 requires that binary operators such as assignment and comparison operators should always be surrounded by a pair of single spaces, and recommends that all other binary operators should typically be surround by single spaces. The recommendation is given here in the "Other Recommendations" section https://www.python.org/dev/peps/pep-0008/#other-recommendations Signed-off-by: Joel Holdsworth <jholdsworth@xxxxxxxxxx> --- git-p4.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/git-p4.py b/git-p4.py index 404de3e86d..90e7922ebd 100755 --- a/git-p4.py +++ b/git-p4.py @@ -67,7 +67,7 @@ defaultLabelRegexp = r'[a-zA-Z0-9_\-.]+$' # The block size is reduced automatically if required -defaultBlockSize = 1<<20 +defaultBlockSize = 1 << 20 p4_access_checked = False @@ -204,7 +204,7 @@ def prompt(prompt_text): sys.stderr.flush() sys.stdout.write(prompt_text) sys.stdout.flush() - response=sys.stdin.readline().strip().lower() + response = sys.stdin.readline().strip().lower() if not response: continue response = response[0] @@ -259,7 +259,7 @@ def run_git_hook(cmd, param=[]): hooks_path = os.path.join(os.environ["GIT_DIR"], "hooks") if not isinstance(param, list): - param=[param] + param = [param] # resolve hook file name, OS depdenent hook_file = os.path.join(hooks_path, cmd) @@ -2411,7 +2411,7 @@ def exportGitTags(self, gitTags): # Create the label - use the same view as the client spec we are using clientSpec = getClientSpec() - labelTemplate = "Label: %s\n" % name + labelTemplate = "Label: %s\n" % name labelTemplate += "Description:\n" for b in body: labelTemplate += "\t" + b + "\n" @@ -2914,7 +2914,7 @@ def extractFilesFromCommit(self, commit, shelved=False, shelved_cl=0): files = [] fnum = 0 while "depotFile%s" % fnum in commit: - path = commit["depotFile%s" % fnum] + path = commit["depotFile%s" % fnum] found = self.isPathWanted(decode_path(path)) if not found: fnum = fnum + 1 @@ -3995,7 +3995,7 @@ def run(self, args): p4Change = 0 for branch in self.p4BranchesInGit: - logMsg = extractLogMessageFromGitCommit(self.refPrefix + branch) + logMsg = extractLogMessageFromGitCommit(self.refPrefix + branch) settings = extractSettingsGitLog(logMsg) -- 2.34.1