summaryrefslogtreecommitdiff
path: root/poezio/args.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-11-12 15:03:09 +0100
committermathieui <mathieui@mathieui.net>2017-11-12 15:03:09 +0100
commitd55cc5872503567775f0d7a7731d6f489bf2299b (patch)
tree725f9e7b8144d36054447b3c82edfb45bda8df1d /poezio/args.py
parent92496db823db34f7f7fb1ab31eaef093a707c3e8 (diff)
downloadpoezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.gz
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.bz2
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.xz
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.zip
yapf -ir
Diffstat (limited to 'poezio/args.py')
-rw-r--r--poezio/args.py40
1 files changed, 27 insertions, 13 deletions
diff --git a/poezio/args.py b/poezio/args.py
index 63e77927..71ae7488 100644
--- a/poezio/args.py
+++ b/poezio/args.py
@@ -6,23 +6,37 @@ There is a fallback to the deprecated optparse if argparse is not found
from os import path
from argparse import ArgumentParser, SUPPRESS
+
def parse_args(CONFIG_PATH=''):
"""
Parse the arguments from the command line
"""
parser = ArgumentParser('poezio')
- parser.add_argument("-c", "--check-config", dest="check_config",
- action='store_true',
- help='Check the config file')
- parser.add_argument("-d", "--debug", dest="debug",
- help="The file where debug will be written",
- metavar="DEBUG_FILE")
- parser.add_argument("-f", "--file", dest="filename",
- default=path.join(CONFIG_PATH, 'poezio.cfg'),
- help="The config file you want to use",
- metavar="CONFIG_FILE")
- parser.add_argument("-v", "--version", dest="version",
- help=SUPPRESS, metavar="VERSION",
- default="1.0-dev")
+ parser.add_argument(
+ "-c",
+ "--check-config",
+ dest="check_config",
+ action='store_true',
+ help='Check the config file')
+ parser.add_argument(
+ "-d",
+ "--debug",
+ dest="debug",
+ help="The file where debug will be written",
+ metavar="DEBUG_FILE")
+ parser.add_argument(
+ "-f",
+ "--file",
+ dest="filename",
+ default=path.join(CONFIG_PATH, 'poezio.cfg'),
+ help="The config file you want to use",
+ metavar="CONFIG_FILE")
+ parser.add_argument(
+ "-v",
+ "--version",
+ dest="version",
+ help=SUPPRESS,
+ metavar="VERSION",
+ default="1.0-dev")
options = parser.parse_args()
return options