Skip to content

Commit 86c72b9

Browse files
committed
address feedback
1 parent 9e100a5 commit 86c72b9

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.generator/parse_googleapis_content.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,15 @@
8787
),
8888
}
8989

90+
_NOOP_CALLABLES = (
91+
"package",
92+
"alias",
93+
"py_test",
94+
"sh_binary",
95+
"proto_library",
96+
"java_proto_library",
97+
"genrule",
98+
)
9099

91100
def parse_content(content: str) -> dict:
92101
"""Parses content from BUILD.bazel and returns a dictionary
@@ -109,13 +118,8 @@ def bazel_target(**args):
109118
def noop_bazel_rule(**args):
110119
pass
111120

112-
mod.add_callable("package", noop_bazel_rule)
113-
mod.add_callable("alias", noop_bazel_rule)
114-
mod.add_callable("py_test", noop_bazel_rule)
115-
mod.add_callable("sh_binary", noop_bazel_rule)
116-
mod.add_callable("proto_library", noop_bazel_rule)
117-
mod.add_callable("java_proto_library", noop_bazel_rule)
118-
mod.add_callable("genrule", noop_bazel_rule)
121+
for noop_callable in _NOOP_CALLABLES:
122+
mod.add_callable(noop_callable, noop_bazel_rule)
119123

120124
def load(name):
121125
mod = sl.Module()

0 commit comments

Comments
 (0)