From ea2e330e43c182dc16b0111ebc69ee5a71ee4ce1 Mon Sep 17 00:00:00 2001 From: Gavin Mak Date: Sat, 11 Mar 2023 06:46:20 +0000 Subject: Format codebase with black and check formatting in CQ Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught by flake8. Also check black formatting in run_tests (and CQ). Bug: b/267675342 Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474 Reviewed-by: Mike Frysinger Tested-by: Gavin Mak Commit-Queue: Gavin Mak --- subcmds/gitc_delete.py | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'subcmds/gitc_delete.py') diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py index df749469..ae9d4d1f 100644 --- a/subcmds/gitc_delete.py +++ b/subcmds/gitc_delete.py @@ -19,28 +19,34 @@ import platform_utils class GitcDelete(Command, GitcClientCommand): - COMMON = True - visible_everywhere = False - helpSummary = "Delete a GITC Client." - helpUsage = """ + COMMON = True + visible_everywhere = False + helpSummary = "Delete a GITC Client." + helpUsage = """ %prog """ - helpDescription = """ + helpDescription = """ This subcommand deletes the current GITC client, deleting the GITC manifest and all locally downloaded sources. """ - def _Options(self, p): - p.add_option('-f', '--force', - dest='force', action='store_true', - help='force the deletion (no prompt)') + def _Options(self, p): + p.add_option( + "-f", + "--force", + dest="force", + action="store_true", + help="force the deletion (no prompt)", + ) - def Execute(self, opt, args): - if not opt.force: - prompt = ('This will delete GITC client: %s\nAre you sure? (yes/no) ' % - self.gitc_manifest.gitc_client_name) - response = input(prompt).lower() - if not response == 'yes': - print('Response was not "yes"\n Exiting...') - sys.exit(1) - platform_utils.rmtree(self.gitc_manifest.gitc_client_dir) + def Execute(self, opt, args): + if not opt.force: + prompt = ( + "This will delete GITC client: %s\nAre you sure? (yes/no) " + % self.gitc_manifest.gitc_client_name + ) + response = input(prompt).lower() + if not response == "yes": + print('Response was not "yes"\n Exiting...') + sys.exit(1) + platform_utils.rmtree(self.gitc_manifest.gitc_client_dir) -- cgit v1.2.3-54-g00ecf