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>
Joel Holdsworth committed
Apr 1, 2022 at 15:24 UTC
6febb9f84307fab60af6873258006d98d97be87f
1 file changed
+5
-5
git-p4.py
+5
-5
@@ -67,7 +67,7 @@ verbose = False
67
defaultLabelRegexp = r'[a-zA-Z0-9_\-.]+$'
68
69
# The block size is reduced automatically if required
70
-defaultBlockSize = 1<<20
70
+defaultBlockSize = 1 << 20
71
72
p4_access_checked = False
73
@@ -201,7 +201,7 @@ def prompt(prompt_text):
201
sys.stderr.flush()
202
sys.stdout.write(prompt_text)
203
sys.stdout.flush()
204
- response=sys.stdin.readline().strip().lower()
204
+ response = sys.stdin.readline().strip().lower()
205
if not response:
206
continue
207
response = response[0]
@@ -2339,7 +2339,7 @@ class P4Submit(Command, P4UserMap):
2339
# Create the label - use the same view as the client spec we are using
2340
clientSpec = getClientSpec()
2341
2342
- labelTemplate = "Label: %s\n" % name
2342
+ labelTemplate = "Label: %s\n" % name
2343
labelTemplate += "Description:\n"
2344
for b in body:
2345
labelTemplate += "\t" + b + "\n"
@@ -2842,7 +2842,7 @@ class P4Sync(Command, P4UserMap):
2842
files = []
2843
fnum = 0
2844
while "depotFile%s" % fnum in commit:
2845
- path = commit["depotFile%s" % fnum]
2845
+ path = commit["depotFile%s" % fnum]
2846
found = self.isPathWanted(decode_path(path))
2847
if not found:
2848
fnum = fnum + 1
@@ -3925,7 +3925,7 @@ class P4Sync(Command, P4UserMap):
3925
3926
p4Change = 0
3927
for branch in self.p4BranchesInGit:
3928
- logMsg = extractLogMessageFromGitCommit(self.refPrefix + branch)
3928
+ logMsg = extractLogMessageFromGitCommit(self.refPrefix + branch)
3929
3930
settings = extractSettingsGitLog(logMsg)
3931