From 1308e9753535aa3a1aa27fac5b6f52ec1450647e Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Sun, 6 May 2018 17:35:01 +0000 Subject: [PATCH] new options: c, C, Q; default options --- lib/options.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/options.py b/lib/options.py index 1b0706f..83377ba 100644 --- a/lib/options.py +++ b/lib/options.py @@ -7,7 +7,9 @@ def parse_args(args): Parse arguments and options. Replace short options with their long counterparts. """ - result = {} + result = { + 'add_comments': True, + } query = "" for key, val in args.items(): @@ -15,15 +17,12 @@ def parse_args(args): query += key continue - if 'T' in query: - result['no-terminal'] = True - if 'q' in query: - result['quiet'] = True - options_meaning = { - "c": dict(add_comments=True), - "C": dict(add_comments=False), + "c": dict(add_comments=False, unindent_code=False), + "C": dict(add_comments=False, unindent_code=True), "Q": dict(remove_text=True), + 'q': dict(quiet=True), + 'T': {'no-terminal': True}, } for option, meaning in options_meaning.items(): if option in query: