diff options
| author | Mike Frysinger <vapier@google.com> | 2023-08-21 21:26:51 -0400 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-08-22 18:22:49 +0000 |
| commit | 06ddc8c50a7e802dbaf8468144c2b5773cda3714 (patch) | |
| tree | 32cda2abbdf1848ad88e87456f753ef1b838fcbe /subcmds | |
| parent | 16109a66b705211efd25f434201d113628aff04c (diff) | |
| download | git-repo-06ddc8c50a7e802dbaf8468144c2b5773cda3714.tar.gz git-repo-06ddc8c50a7e802dbaf8468144c2b5773cda3714.zip | |
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.py | 6 | ||||
| -rw-r--r-- | subcmds/selfupdate.py | 4 | ||||
| -rw-r--r-- | subcmds/sync.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/subcmds/abandon.py b/subcmds/abandon.py index 896b348f3..1499c75eb 100644 --- a/subcmds/abandon.py +++ b/subcmds/abandon.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from collections import defaultdict +import collections import functools import itertools import sys @@ -88,8 +88,8 @@ It is equivalent to "git branch -D <branchname>". def Execute(self, opt, args): nb = args[0].split() - err = defaultdict(list) - success = defaultdict(list) + err = collections.defaultdict(list) + success = collections.defaultdict(list) aggregate_errors = [] all_projects = self.GetProjects( args[1:], all_manifests=not opt.this_manifest_only diff --git a/subcmds/selfupdate.py b/subcmds/selfupdate.py index 00376b66f..983fd630b 100644 --- a/subcmds/selfupdate.py +++ b/subcmds/selfupdate.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from optparse import SUPPRESS_HELP +import optparse import sys from command import Command, MirrorSafeCommand @@ -52,7 +52,7 @@ need to be performed by an end-user. "--repo-upgraded", dest="repo_upgraded", action="store_true", - help=SUPPRESS_HELP, + help=optparse.SUPPRESS_HELP, ) def Execute(self, opt, args): diff --git a/subcmds/sync.py b/subcmds/sync.py index 159771eb8..74bc45571 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -19,7 +19,7 @@ import io import json import multiprocessing import netrc -from optparse import SUPPRESS_HELP +import optparse import os import socket import sys @@ -481,7 +481,7 @@ later is required to fix a server side protocol bug. "--repo-upgraded", dest="repo_upgraded", action="store_true", - help=SUPPRESS_HELP, + help=optparse.SUPPRESS_HELP, ) def _GetBranch(self, manifest_project): |
