diff options
author | Joel Holdsworth <jholdsworth@nvidia.com> | 2022-04-01 15:24:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-04-01 13:15:44 -0700 |
commit | 6febb9f84307fab60af6873258006d98d97be87f (patch) | |
tree | 82d75552bb43a2038c35535311eee818b472866b /git-p4.py | |
parent | c785e2029c478dce241f9e07e657ec372b633e6c (diff) | |
download | git-6febb9f84307fab60af6873258006d98d97be87f.tar.gz |
git-p4: ensure there is a single space around all operators
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@nvidia.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-x | git-p4.py | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -67,7 +67,7 @@ verbose = False defaultLabelRegexp = r'[a-zA-Z0-9_\-.]+$' # The block size is reduced automatically if required -defaultBlockSize = 1<<20 +defaultBlockSize = 1 << 20 p4_access_checked = False @@ -201,7 +201,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] @@ -2339,7 +2339,7 @@ class P4Submit(Command, P4UserMap): # 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" @@ -2842,7 +2842,7 @@ class P4Sync(Command, P4UserMap): 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 @@ -3925,7 +3925,7 @@ class P4Sync(Command, P4UserMap): p4Change = 0 for branch in self.p4BranchesInGit: - logMsg = extractLogMessageFromGitCommit(self.refPrefix + branch) + logMsg = extractLogMessageFromGitCommit(self.refPrefix + branch) settings = extractSettingsGitLog(logMsg) |