Commit 2b2b425d authored by W. Trevor King's avatar W. Trevor King
Browse files

igor.script: Replace ArgumentParser(version=...) with a version argument

ArgumentParser lost its undocumented version argument in 3.3.0
[1,2,3].  The version action is the documented way to do this [4].

parent 2c2a79d8
......@@ -36,8 +36,10 @@ class Script (object):
log_levels = [_logging.ERROR, _logging.WARNING, _logging.INFO, _logging.DEBUG]
def __init__(self, description=None, filetype='IGOR Binary Wave (.ibw) file'):
self.parser = _argparse.ArgumentParser(
description=description, version=__version__)
self.parser = _argparse.ArgumentParser(description=description)
'--version', action='version',
version='%(prog)s {}'.format(__version__))
'-f', '--infile', metavar='FILE', default='-',
help='input {}'.format(filetype))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment