From e78225930f541e94cd050afe6895ccec0703316d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Fri, 24 Jun 2016 14:42:17 +0300 Subject: code style --- bin/mutual_friends.py | 2 +- bin/online_duration.py | 6 +++--- bin/track_status.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/mutual_friends.py b/bin/mutual_friends.py index c0d8ffc..56b19f6 100644 --- a/bin/mutual_friends.py +++ b/bin/mutual_friends.py @@ -83,7 +83,7 @@ def _parse_args(args=sys.argv): help='user IDs or "screen names"') parser.add_argument('--output-format', dest='fmt', type=_parse_output_format, default=OutputFormat.CSV, - choices=tuple(fmt for fmt in OutputFormat), + choices=OutputFormat, help='specify output format') parser.add_argument('-o', '--output', dest='fd', metavar='PATH', type=argparse.FileType('w', encoding='utf-8'), diff --git a/bin/online_duration.py b/bin/online_duration.py index 5ddb34a..abf8b29 100644 --- a/bin/online_duration.py +++ b/bin/online_duration.py @@ -378,16 +378,16 @@ def _parse_args(args=sys.argv): help='output path (standard output by default)') parser.add_argument('--grouping', type=_parse_grouping, default=Grouping.USER, - choices=tuple(grouping for grouping in Grouping), + choices=Grouping, help='set grouping') parser.add_argument('--input-format', dest='db_fmt', type=_parse_database_format, default=DatabaseFormat.CSV, - choices=tuple(fmt for fmt in DatabaseFormat), + choices=DatabaseFormat, help='specify database format') parser.add_argument('--output-format', dest='fmt', type=_parse_output_format, default=OutputFormat.CSV, - choices=tuple(fmt for fmt in OutputFormat), + choices=OutputFormat, help='specify output format') parser.add_argument('--from', dest='date_from', type=_parse_date_range_limit, default=None, diff --git a/bin/track_status.py b/bin/track_status.py index bf70328..6f1b0b5 100644 --- a/bin/track_status.py +++ b/bin/track_status.py @@ -36,7 +36,7 @@ def _parse_args(args=sys.argv): help='set log file path (standard output by default)') parser.add_argument('--output-format', dest='fmt', type=_parse_output_format, default=DatabaseFormat.CSV, - choices=tuple(fmt for fmt in DatabaseFormat), + choices=DatabaseFormat, help='set database format') parser.add_argument('-o', '--output', metavar='PATH', dest='fd', type=argparse.FileType('w', encoding='utf-8'), -- cgit v1.2.3