git-p4: remove redundant backslash-continuations inside brackets
PEP8 recommends that backslash line continuations should only be used for line-breaks outside parentheses. This recommendation is described in the "Maximum Line Length" section: https://www.python.org/dev/peps/pep-0008/#maximum-line-length 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
968e29e16bf6ea5565208bf5440f7bcee1be2891
1 file changed
+9
-9
git-p4.py
+9
-9
@@ -2201,13 +2201,13 @@ class P4Submit(Command, P4UserMap):
2201
print(" " + self.clientPath)
2202
print("")
2203
print("To submit, use \"p4 submit\" to write a new description,")
2204
- print("or \"p4 submit -i <%s\" to use the one prepared by" \
2204
+ print("or \"p4 submit -i <%s\" to use the one prepared by"
2205
" \"git p4\"." % fileName)
2206
print("You can delete the file \"%s\" when finished." % fileName)
2207
2208
if self.preserveUser and p4User and not self.p4UserIsMe(p4User):
2209
- print("To preserve change ownership by user %s, you must\n" \
2210
- "do \"p4 change -f <change>\" after submitting and\n" \
2209
+ print("To preserve change ownership by user %s, you must\n"
2210
+ "do \"p4 change -f <change>\" after submitting and\n"
2211
"edit the User field.")
2212
if pureRenameCopy:
2213
print("After submitting, renamed files must be re-synced.")
@@ -2350,7 +2350,7 @@ class P4Submit(Command, P4UserMap):
2350
if self.dry_run:
2351
print("Would create p4 label %s for tag" % name)
2352
elif self.prepare_p4_only:
2353
- print("Not creating p4 label %s for tag due to option" \
2353
+ print("Not creating p4 label %s for tag due to option"
2354
" --prepare-p4-only" % name)
2355
else:
2356
p4_write_pipe(["label", "-i"], labelTemplate)
@@ -2515,12 +2515,12 @@ class P4Submit(Command, P4UserMap):
2515
if not self.no_verify:
2516
try:
2517
if not run_git_hook("p4-pre-submit"):
2518
- print("\nThe p4-pre-submit hook failed, aborting the submit.\n\nYou can skip " \
2519
- "this pre-submission check by adding\nthe command line option '--no-verify', " \
2518
+ print("\nThe p4-pre-submit hook failed, aborting the submit.\n\nYou can skip "
2519
+ "this pre-submission check by adding\nthe command line option '--no-verify', "
2520
"however,\nthis will also skip the p4-changelist hook as well.")
2521
sys.exit(1)
2522
except Exception as e:
2523
- print("\nThe p4-pre-submit hook failed, aborting the submit.\n\nThe hook failed "\
2523
+ print("\nThe p4-pre-submit hook failed, aborting the submit.\n\nThe hook failed "
2524
"with the error '{0}'".format(e.message))
2525
sys.exit(1)
2526
@@ -2543,7 +2543,7 @@ class P4Submit(Command, P4UserMap):
2543
applied.append(commit)
2544
if self.prepare_p4_only:
2545
if i < last:
2546
- print("Processing only the first commit due to option" \
2546
+ print("Processing only the first commit due to option"
2547
" --prepare-p4-only")
2548
break
2549
else:
@@ -4206,7 +4206,7 @@ class P4Clone(P4Sync):
4206
if not self.cloneBare:
4207
system(["git", "checkout", "-f"])
4208
else:
4209
- print('Not checking out any branch, use ' \
4209
+ print('Not checking out any branch, use '
4210
'"git checkout -q -b master <branch>"')
4211
4212
# auto-set this variable if invoked with --use-client-spec