MCPcopy Create free account
hub / github.com/BerriAI/litellm / main

Function main

scripts/openapi_docs_gate.py:177–195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175
176
177def main() -> None:
178 parser: Final = argparse.ArgumentParser(description=__doc__)
179 parser.add_argument("--base", help="Comparison ref (default: origin's current default branch)")
180 parser.add_argument(
181 "--emit-counts-dir",
182 type=Path,
183 help="Write HEAD's per-rule counts to this directory as a base-counts artifact instead of gating",
184 )
185 args: Final = parser.parse_args()
186 from default_branch import resolve_base_ref
187 from gate_slot_lock import held_slot
188
189 if args.emit_counts_dir is not None:
190 with held_slot():
191 emit_counts(checker_identity(), count_by_rule(head_violations()), args.emit_counts_dir, head_sha())
192 return
193 base_ref: Final = resolve_base_ref(args.base, REPO_ROOT)
194 with held_slot():
195 cmd_check(base_ref)
196
197
198if __name__ == "__main__":

Callers 1

Calls 8

held_slotFunction · 0.90
emit_countsFunction · 0.90
head_shaFunction · 0.90
resolve_base_refFunction · 0.90
checker_identityFunction · 0.70
count_by_ruleFunction · 0.70
head_violationsFunction · 0.70
cmd_checkFunction · 0.70

Tested by

no test coverage detected