Fixable#
- class Fixable(trait, default_value=None, unicode=False, range=True, allow_none=True, **kwargs)#
Bases:
UnionFixable parameter, specified in a filename pattern.
A fixable parameter meant to work with
filefinder. It can take:a value of the appropriate type,
a string specifying a range of values, see
Range,a string that will be interpreted as a regular expression to match a filename part,
a list of values (see 1), any of which will be accepted as a valid filename part.
- Parameters:
trait (TraitType) – Trait instance.
default_value (Any) – The default value.
unicode (bool) – Allow string values. Default is False as this can be dangerous, any value from command line that cannot be parsed would still be allowed.
range (bool) – If trait is Int or Float, allow to transform a string into a range of value using
Range.allow_none (bool) – Allow None as a valid value. Default is True.
kwargs (Any) – Arguments passed to the Union trait created.