Commit 55cd31ff authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Switch argparser help text to docstrings

parent 53dd2560
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ def main(argv=None):
	parser = argparse.ArgumentParser(__package__)
	subparsers = parser.add_subparsers(required=True)

	score_parser = subparsers.add_parser('score')
	score_parser = subparsers.add_parser('score', help=cmd_score.__doc__)
	score_parser.set_defaults(cmd=cmd_score)
	score_parser.add_argument(
		'--minimum', '--min',
@@ -49,12 +49,7 @@ def main(argv=None):
		"""
	)

	badge_parser = subparsers.add_parser(
		'badge',
		help="""
		Generate a shield.io badge to display the score
		"""
	)
	badge_parser = subparsers.add_parser('badge', help=cmd_badge.__doc__)
	badge_parser.set_defaults(cmd=cmd_badge)
	badge_parser.add_argument(
		'input',
@@ -101,7 +96,9 @@ def cmd_score(args) -> int:


def cmd_badge(args) -> int:
	"""Make a lint score badge from lint stats"""
	"""
	Generate a shield.io badge to display the score
	"""
	with args.input as fh:
		results = json.load(fh)
	score = reporter.calculate_score(results['stats'])