aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2023-05-26 22:30:04 -0400
committerMike Frysinger <vapier@google.com>2023-05-26 22:30:35 -0400
commitdf5275525716d5ca48f089dc8b900da199038d88 (patch)
treea543bae13c836a7cad916af1d98fccd5f3f7e17b
parent958d01176166cce29564cc3a2ef1e03db8159827 (diff)
downloadrepohooks-df5275525716d5ca48f089dc8b900da199038d88.tar.gz
google-java-format: fix style errors
Sort imports, and import modules, not functions. Bug: 254537505 Test: None Change-Id: I55f6c4c72b1eabe96d5afe7ed0a83facb1c3e9b3
-rwxr-xr-xtools/google-java-format.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/google-java-format.py b/tools/google-java-format.py
index 8a4f739..fcb5521 100755
--- a/tools/google-java-format.py
+++ b/tools/google-java-format.py
@@ -17,8 +17,8 @@
import argparse
import os
+import shutil
import sys
-from shutil import which
_path = os.path.realpath(__file__ + '/../..')
if sys.path[0] != _path:
@@ -60,7 +60,7 @@ def main(argv):
parser = get_parser()
opts = parser.parse_args(argv)
- format_path = which(opts.google_java_format)
+ format_path = shutil.which(opts.google_java_format)
if not format_path:
print(
f'Unable to find google-java-format at: {opts.google_java_format}',