Skip to content

Commit

Permalink
Change -p/--period argument to str with choices
Browse files Browse the repository at this point in the history
Updated contributors.txt
  • Loading branch information
wmbaum committed Mar 12, 2020
1 parent 6148773 commit 972b4a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions contributors.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Tom Goetz
William Baum
2 changes: 1 addition & 1 deletion graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def date_from_string(date_string):
stats_group.add_argument("-r", "--hr", help="Graph heart rate data.", dest='stats', action='append_const', const=Statistics.rhr)
stats_group.add_argument("-s", "--steps", help="Graph steps data.", dest='stats', action='append_const', const=Statistics.sleep)
stats_group.add_argument("-w", "--weight", help="Graph weight data.", dest='stats', action='append_const', const=Statistics.weight)
stats_group.add_argument("-p", "--period", help="Graph the latest data.", dest='period', type=int, default=None)
stats_group.add_argument("-p", "--period", help="Graph period granularity.", dest='period', type=str, default=None,choices=['days', 'weeks', 'months'])
daily_group = parser.add_argument_group('Daily')
daily_group.add_argument("-d", "--day", help="Graph composite data for a single day.", type=date_from_string)
modifiers_group = parser.add_argument_group('Modifiers')
Expand Down

0 comments on commit 972b4a4

Please sign in to comment.