Patch group of option : types must be callable not a string

This commit is contained in:
2017-07-28 09:36:18 +02:00
parent 9482c663c0
commit da48a9d1af
2 changed files with 9 additions and 9 deletions

View File

@ -13,14 +13,14 @@ def __addInputOption(optionManager):
action="store", dest="obi:skip",
metavar='<N>',
default=None,
type='int',
type=int,
help="skip the N first sequences")
group.add_argument('--only',
action="store", dest="obi:only",
metavar='<N>',
default=None,
type='int',
type=int,
help="treat only N sequences")
@ -115,19 +115,19 @@ def __addTabularInputOption(optionManager):
group.add_argument('--sep',
action="store", dest="obi:sep",
default=None,
type="bytes",
type=bytes,
help="Column separator")
group.add_argument('--dec',
action="store", dest="obi:dec",
default=b".",
type="bytes",
type=bytes,
help="Decimal separator")
group.add_argument('--na-string',
action="store", dest="obi:nastring",
default=b"NA",
type="bytes",
type=bytes,
help="String associated to Non Available (NA) values")
group.add_argument('--strip-white',
@ -143,10 +143,10 @@ def __addTabularInputOption(optionManager):
group.add_argument('--comment-char',
action="store", dest="obi:commentchar",
default=b"#",
type="bytes",
type=bytes,
help="Lines starting by this char are considered as comment")
def addMinimalOption(optionManager):
def addMinimalInputOption(optionManager):
__addInputOption(optionManager)
def addSequenceInputOption(optionManager):

View File

@ -5,7 +5,7 @@ from obitools3.dms.dms import DMS # TODO cimport doesn't work
from obitools3.dms.view.view import View, Line_selection # TODO cimport doesn't work
from obitools3.apps.optiongroups import addInputOption
from obitools3.apps.optiongroups import addSequenceInputOption
from functools import reduce
import time
@ -18,7 +18,7 @@ default_config = { 'inputview' : None,
def addOptions(parser):
addInputOption(parser)
addSequenceInputOption(parser)
# TODO put this common group somewhere else but I don't know where
group=parser.add_argument_group('DMS and view options')