File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 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
91100def 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 ()
You can’t perform that action at this time.
0 commit comments