cosmetics on datatypes.TextType
make __repr__ more nice and include in __all__ Change-Id: Iecfe6326f2d35a2210c03f7bd8c84dc2830b19ea Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/23120 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
parent
f7a6ba8b5b
commit
a25cb3dce5
@ -40,7 +40,7 @@ __all__ = [
|
|||||||
'DataType', 'get_datatype',
|
'DataType', 'get_datatype',
|
||||||
'FloatRange', 'IntRange', 'ScaledInteger',
|
'FloatRange', 'IntRange', 'ScaledInteger',
|
||||||
'BoolType', 'EnumType',
|
'BoolType', 'EnumType',
|
||||||
'BLOBType', 'StringType',
|
'BLOBType', 'StringType', 'TextType',
|
||||||
'TupleOf', 'ArrayOf', 'StructOf',
|
'TupleOf', 'ArrayOf', 'StructOf',
|
||||||
'CommandType', 'StatusType',
|
'CommandType', 'StatusType',
|
||||||
]
|
]
|
||||||
@ -592,7 +592,9 @@ class TextType(StringType):
|
|||||||
super(TextType, self).__init__(0, maxchars)
|
super(TextType, self).__init__(0, maxchars)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return 'TextType(%d, %d)' % (self.minchars, self.maxchars)
|
if self.maxchars == UNLIMITED:
|
||||||
|
return 'TextType()'
|
||||||
|
return 'TextType(%d)' % (self.maxchars)
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
# DataType.copy will not work, because it is exported as 'string'
|
# DataType.copy will not work, because it is exported as 'string'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user