MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

ci/tools/coderabbit_addressor.py:221–245  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

219
220
221def main() -> int:
222 ap = argparse.ArgumentParser()
223 ap.add_argument(
224 "pr", nargs="?", type=int, help="PR number (default: current branch)"
225 )
226 group = ap.add_mutually_exclusive_group(required=True)
227 group.add_argument("--plan", action="store_true")
228 group.add_argument("--reply", nargs=2, metavar=("COMMENT_ID", "MESSAGE"))
229 group.add_argument("--check", action="store_true")
230 args = ap.parse_args()
231
232 pr = args.pr or _current_pr()
233 if pr is None:
234 print("[address-reviews] no PR found for current branch", file=sys.stderr)
235 return 2
236
237 if args.plan:
238 print(json.dumps(plan(pr), indent=2))
239 return 0
240 if args.reply:
241 reply(pr, int(args.reply[0]), args.reply[1])
242 return 0
243 if args.check:
244 return check(pr)
245 return 2
246
247
248if __name__ == "__main__":

Callers 1

Calls 6

_current_prFunction · 0.85
planFunction · 0.85
replyFunction · 0.85
parse_argsMethod · 0.80
checkFunction · 0.70
printFunction · 0.50

Tested by

no test coverage detected