@@ -243,17 +243,18 @@ def checkfield(self, field):
243
243
if not hasattr (label_store [i ], '__index__' ):
244
244
raise TypeError ('The label_store values of the ' + field + ' field must be integer-like' )
245
245
246
- if not isinstance (symbol [i ], strtypes ) or len (symbol [i ]) not in [1 ,2 ]:
247
- raise ValueError ('The symbol values of the ' + field + ' field must be strings of length 1 or 2 ' )
246
+ if not isinstance (symbol [i ], strtypes ) or len (symbol [i ]) not in [1 ,2 , 3 ]:
247
+ raise ValueError ('The symbol values of the ' + field + ' field must be strings of length 1 to 3 ' )
248
248
249
249
if bool (re .search ('[ \t \n \r \f \v ]' , symbol [i ])):
250
250
raise ValueError ('The symbol values of the ' + field + ' field must not contain whitespace characters' )
251
251
252
252
if not isinstance (description [i ], strtypes ):
253
253
raise TypeError ('The description values of the ' + field + ' field must be strings' )
254
254
255
- if bool (re .search ('[\t \n \r \f \v ]' , description [i ])):
256
- raise ValueError ('The description values of the ' + field + ' field must not contain tabs or newlines' )
255
+ # Would be good to enfore this but existing garbage annotations have tabs and newlines...
256
+ #if bool(re.search('[\t\n\r\f\v]', description[i])):
257
+ # raise ValueError('The description values of the '+field+' field must not contain tabs or newlines')
257
258
258
259
# The string fields
259
260
elif field in ['symbol' , 'description' , 'aux_note' ]:
@@ -265,8 +266,8 @@ def checkfield(self, field):
265
266
266
267
if field == 'symbol' :
267
268
for e in uniq_elements :
268
- if len (e ) not in [1 ,2 ]:
269
- raise ValueError ('Subelements of the ' + field + ' field must be strings of length 1 or 2 ' )
269
+ if len (e ) not in [1 ,2 , 3 ]:
270
+ raise ValueError ('Subelements of the ' + field + ' field must be strings of length 1 to 3 ' )
270
271
if bool (re .search ('[ \t \n \r \f \v ]' , e )):
271
272
raise ValueError ('Subelements of the ' + field + ' field may not contain whitespace characters' )
272
273
else :
0 commit comments