aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plot.py
diff options
context:
space:
mode:
Diffstat (limited to 'plot.py')
-rw-r--r--plot.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/plot.py b/plot.py
index 35fd6ed..3f6b905 100644
--- a/plot.py
+++ b/plot.py
@@ -63,11 +63,14 @@ def _format_available_algorithms():
def _format_description():
return _format_available_algorithms()
-def _parse_args(args=sys.argv):
- parser = argparse.ArgumentParser(
+def _create_argument_parser():
+ return argparse.ArgumentParser(
description=_format_description(),
formatter_class=argparse.RawDescriptionHelpFormatter)
+def _parse_args(args=sys.argv):
+ parser = _create_argument_parser()
+
parser.add_argument('algorithm', metavar='CODENAME',
choices=registry.get_codenames(),
help='algorithm codename')