diff --git a/secop/params.py b/secop/params.py index af26423..310a195 100644 --- a/secop/params.py +++ b/secop/params.py @@ -120,7 +120,7 @@ class Parameter(Accessible): NoneOr(BoolType()), export=False, default=None, mandatory=False, settable=False), } - def __init__(self, description, datatype, ctr=None, unit=None, **kwds): + def __init__(self, description, datatype, *, ctr=None, unit=None, **kwds): if ctr is not None: self.ctr = ctr @@ -227,13 +227,15 @@ class Override(CountedObj): note: overrides are applied by the metaclass during class creating reorder= True: use position of Override instead of inherited for the order """ - def __init__(self, description="", reorder=False, **kwds): + def __init__(self, description="", datatype=None, *, reorder=False, **kwds): super(Override, self).__init__() self.kwds = kwds self.reorder = reorder - # allow to override description without keyword + # allow to override description and datatype without keyword if description: self.kwds['description'] = description + if datatype is not None: + self.kwds['datatype'] = datatype # for now, do not use the Override ctr # self.kwds['ctr'] = self.ctr