summaryrefslogtreecommitdiffstats
path: root/python/fatcat_review.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_review.py')
-rwxr-xr-xpython/fatcat_review.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/python/fatcat_review.py b/python/fatcat_review.py
index 40bc7041..1d1db9a5 100755
--- a/python/fatcat_review.py
+++ b/python/fatcat_review.py
@@ -14,7 +14,7 @@ sentry_client = raven.Client()
def run_dummy(args):
reviewer = DummyReviewBot(args.api, poll_interval=args.poll_interval,
- verbose=args.debug)
+ verbose=args.verbose)
if args.editgroup:
annotation = reviewer.run_single(args.editgroup, args.annotate)
print(annotation)
@@ -22,11 +22,12 @@ def run_dummy(args):
reviewer.run()
def main():
- parser = argparse.ArgumentParser()
- parser.add_argument('--debug',
+ parser = argparse.ArgumentParser(
+ formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+ parser.add_argument('--verbose',
action='store_true',
- help="enable debug logging")
- parser.add_argument('--api-host-url',
+ help="enable verbose output")
+ parser.add_argument('--fatcat-api-url',
default="http://localhost:9411/v0",
help="fatcat API host/port to use")
parser.add_argument('--poll-interval',
@@ -34,7 +35,8 @@ def main():
default=10.0, type=float)
subparsers = parser.add_subparsers()
- sub_dummy = subparsers.add_parser('dummy')
+ sub_dummy = subparsers.add_parser('dummy',
+ help="example/demonstration review bot")
sub_dummy.set_defaults(func=run_dummy)
sub_dummy.add_argument("--continuous",
action="store_true",
@@ -53,7 +55,7 @@ def main():
print("need to run on a single editgroup, or continuous")
sys.exit(-1)
- args.api = authenticated_api(args.api_host_url)
+ args.api = authenticated_api(args.fatcat_api_url)
args.func(args)
if __name__ == '__main__':