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 /repo_trace.py | |
parent | 16109a66b705211efd25f434201d113628aff04c (diff) | |
download | git-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 'repo_trace.py')
-rw-r--r-- | repo_trace.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/repo_trace.py b/repo_trace.py index 49462174..01beaf8e 100644 --- a/repo_trace.py +++ b/repo_trace.py | |||
@@ -20,11 +20,11 @@ Temporary: Tracing is always on. Set `REPO_TRACE=0` to turn off. | |||
20 | To also include trace outputs in stderr do `repo --trace_to_stderr ...` | 20 | To also include trace outputs in stderr do `repo --trace_to_stderr ...` |
21 | """ | 21 | """ |
22 | 22 | ||
23 | import contextlib | ||
23 | import sys | 24 | import sys |
24 | import os | 25 | import os |
25 | import time | 26 | import time |
26 | import tempfile | 27 | import tempfile |
27 | from contextlib import ContextDecorator | ||
28 | 28 | ||
29 | import platform_utils | 29 | import platform_utils |
30 | 30 | ||
@@ -68,7 +68,7 @@ def _SetTraceFile(quiet): | |||
68 | _TRACE_FILE = _GetTraceFile(quiet) | 68 | _TRACE_FILE = _GetTraceFile(quiet) |
69 | 69 | ||
70 | 70 | ||
71 | class Trace(ContextDecorator): | 71 | class Trace(contextlib.ContextDecorator): |
72 | """Used to capture and save git traces.""" | 72 | """Used to capture and save git traces.""" |
73 | 73 | ||
74 | def _time(self): | 74 | def _time(self): |