summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2023-08-21 21:26:51 -0400
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-08-22 18:22:49 +0000
commit06ddc8c50a7e802dbaf8468144c2b5773cda3714 (patch)
tree32cda2abbdf1848ad88e87456f753ef1b838fcbe /subcmds
parent16109a66b705211efd25f434201d113628aff04c (diff)
downloadgit-repo-06ddc8c50a7e802dbaf8468144c2b5773cda3714.tar.gz
tweak stdlib imports to follow Google style guide
Google Python style guide says to import modules. Clean up all our stdlib imports. Leave the repo ones alone for now as that's a much bigger shave. Change-Id: Ida42fc2ae78b86e6b7a6cbc98f94ca04b295f8cc Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/383714 Reviewed-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds')
-rw-r--r--subcmds/abandon.py6
-rw-r--r--subcmds/selfupdate.py4
-rw-r--r--subcmds/sync.py4
3 files changed, 7 insertions, 7 deletions
diff --git a/subcmds/abandon.py b/subcmds/abandon.py
index 896b348f..1499c75e 100644
--- a/subcmds/abandon.py
+++ b/subcmds/abandon.py
@@ -12,7 +12,7 @@
12# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
13# limitations under the License. 13# limitations under the License.
14 14
15from collections import defaultdict 15import collections
16import functools 16import functools
17import itertools 17import itertools
18import sys 18import sys
@@ -88,8 +88,8 @@ It is equivalent to "git branch -D <branchname>".
88 88
89 def Execute(self, opt, args): 89 def Execute(self, opt, args):
90 nb = args[0].split() 90 nb = args[0].split()
91 err = defaultdict(list) 91 err = collections.defaultdict(list)
92 success = defaultdict(list) 92 success = collections.defaultdict(list)
93 aggregate_errors = [] 93 aggregate_errors = []
94 all_projects = self.GetProjects( 94 all_projects = self.GetProjects(
95 args[1:], all_manifests=not opt.this_manifest_only 95 args[1:], all_manifests=not opt.this_manifest_only
diff --git a/subcmds/selfupdate.py b/subcmds/selfupdate.py
index 00376b66..983fd630 100644
--- a/subcmds/selfupdate.py
+++ b/subcmds/selfupdate.py
@@ -12,7 +12,7 @@
12# See the License for the specific language governing permissions and 12# See the License for the specific language governing permissions and
13# limitations under the License. 13# limitations under the License.
14 14
15from optparse import SUPPRESS_HELP 15import optparse
16import sys 16import sys
17 17
18from command import Command, MirrorSafeCommand 18from command import Command, MirrorSafeCommand
@@ -52,7 +52,7 @@ need to be performed by an end-user.
52 "--repo-upgraded", 52 "--repo-upgraded",
53 dest="repo_upgraded", 53 dest="repo_upgraded",
54 action="store_true", 54 action="store_true",
55 help=SUPPRESS_HELP, 55 help=optparse.SUPPRESS_HELP,
56 ) 56 )
57 57
58 def Execute(self, opt, args): 58 def Execute(self, opt, args):
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 159771eb..74bc4557 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -19,7 +19,7 @@ import io
19import json 19import json
20import multiprocessing 20import multiprocessing
21import netrc 21import netrc
22from optparse import SUPPRESS_HELP 22import optparse
23import os 23import os
24import socket 24import socket
25import sys 25import sys
@@ -481,7 +481,7 @@ later is required to fix a server side protocol bug.
481 "--repo-upgraded", 481 "--repo-upgraded",
482 dest="repo_upgraded", 482 dest="repo_upgraded",
483 action="store_true", 483 action="store_true",
484 help=SUPPRESS_HELP, 484 help=optparse.SUPPRESS_HELP,
485 ) 485 )
486 486
487 def _GetBranch(self, manifest_project): 487 def _GetBranch(self, manifest_project):