Run yapf on all python files in the repo
Signed-off-by: Ravago Jones <ravagojones@gmail.com>
Change-Id: I221e04c3f517fab8535b22551553799e0fee7a80
diff --git a/tools/go/mirror_lib.py b/tools/go/mirror_lib.py
index ea23abc..b613ca8 100644
--- a/tools/go/mirror_lib.py
+++ b/tools/go/mirror_lib.py
@@ -13,6 +13,7 @@
with open(filepath, "r") as file:
return file.read()
+
def parse_go_repositories(filepath: str) -> List[Dict[str, str]]:
"""Parses the top-level go_deps.bzl file.
@@ -53,7 +54,8 @@
return global_data["GO_MIRROR_INFO"]
-def write_go_mirror_info(filepath: str, mirror_info: Dict[str, Dict[str, str]]):
+def write_go_mirror_info(filepath: str, mirror_info: Dict[str, Dict[str,
+ str]]):
"""Saves the specified mirror_info as GO_MIRROR_INFO into tools/go/go_mirrors.bzl."""
with open(filepath, "w") as file:
file.write("# This file is auto-generated. Do not edit.\n")
@@ -64,9 +66,10 @@
# Properly format the file now so that the linter doesn't complain.
r = runfiles.Create()
- subprocess.run(
- [
- r.Rlocation("com_github_bazelbuild_buildtools/buildifier/buildifier_/buildifier"),
- filepath,
- ],
- check=True)
+ subprocess.run([
+ r.Rlocation(
+ "com_github_bazelbuild_buildtools/buildifier/buildifier_/buildifier"
+ ),
+ filepath,
+ ],
+ check=True)