@@ -38,7 +38,7 @@ def _wrapper(self, value):
38
38
# Primitive types
39
39
class String (BuiltinType ):
40
40
_default_qname = xsd_ns ("string" )
41
- accepted_types = ( str ,)
41
+ accepted_types = [ str ]
42
42
43
43
@check_no_collection
44
44
def xmlvalue (self , value ):
@@ -52,7 +52,7 @@ def pythonvalue(self, value):
52
52
53
53
class Boolean (BuiltinType ):
54
54
_default_qname = xsd_ns ("boolean" )
55
- accepted_types = ( bool ,)
55
+ accepted_types = [ bool ]
56
56
57
57
@check_no_collection
58
58
def xmlvalue (self , value ):
@@ -68,7 +68,7 @@ def pythonvalue(self, value):
68
68
69
69
class Decimal (BuiltinType ):
70
70
_default_qname = xsd_ns ("decimal" )
71
- accepted_types = ( _Decimal , float , str )
71
+ accepted_types = [ _Decimal , float , str ]
72
72
73
73
@check_no_collection
74
74
def xmlvalue (self , value ):
@@ -80,7 +80,7 @@ def pythonvalue(self, value):
80
80
81
81
class Float (BuiltinType ):
82
82
_default_qname = xsd_ns ("float" )
83
- accepted_types = ( float , _Decimal , str )
83
+ accepted_types = [ float , _Decimal , str ]
84
84
85
85
def xmlvalue (self , value ):
86
86
return str (value ).upper ()
@@ -91,7 +91,7 @@ def pythonvalue(self, value):
91
91
92
92
class Double (BuiltinType ):
93
93
_default_qname = xsd_ns ("double" )
94
- accepted_types = ( _Decimal , float , str )
94
+ accepted_types = [ _Decimal , float , str ]
95
95
96
96
@check_no_collection
97
97
def xmlvalue (self , value ):
@@ -103,7 +103,7 @@ def pythonvalue(self, value):
103
103
104
104
class Duration (BuiltinType ):
105
105
_default_qname = xsd_ns ("duration" )
106
- accepted_types = ( isodate .duration .Duration , str )
106
+ accepted_types = [ isodate .duration .Duration , str ]
107
107
108
108
@check_no_collection
109
109
def xmlvalue (self , value ):
@@ -120,7 +120,7 @@ def pythonvalue(self, value):
120
120
121
121
class DateTime (BuiltinType ):
122
122
_default_qname = xsd_ns ("dateTime" )
123
- accepted_types = ( datetime .datetime , str )
123
+ accepted_types = [ datetime .datetime , str ]
124
124
125
125
@check_no_collection
126
126
def xmlvalue (self , value ):
@@ -155,7 +155,7 @@ def pythonvalue(self, value):
155
155
156
156
class Time (BuiltinType ):
157
157
_default_qname = xsd_ns ("time" )
158
- accepted_types = ( datetime .time , str )
158
+ accepted_types = [ datetime .time , str ]
159
159
160
160
@check_no_collection
161
161
def xmlvalue (self , value ):
@@ -172,7 +172,7 @@ def pythonvalue(self, value):
172
172
173
173
class Date (BuiltinType ):
174
174
_default_qname = xsd_ns ("date" )
175
- accepted_types = ( datetime .date , str )
175
+ accepted_types = [ datetime .date , str ]
176
176
177
177
@check_no_collection
178
178
def xmlvalue (self , value ):
@@ -192,7 +192,7 @@ class gYearMonth(BuiltinType):
192
192
193
193
"""
194
194
195
- accepted_types = ( datetime .date , str )
195
+ accepted_types = [ datetime .date , str ]
196
196
_default_qname = xsd_ns ("gYearMonth" )
197
197
_pattern = re .compile (
198
198
r"^(?P<year>-?\d{4,})-(?P<month>\d\d)(?P<timezone>Z|[-+]\d\d:?\d\d)?$"
@@ -222,7 +222,7 @@ class gYear(BuiltinType):
222
222
223
223
"""
224
224
225
- accepted_types = ( datetime .date , str )
225
+ accepted_types = [ datetime .date , str ]
226
226
_default_qname = xsd_ns ("gYear" )
227
227
_pattern = re .compile (r"^(?P<year>-?\d{4,})(?P<timezone>Z|[-+]\d\d:?\d\d)?$" )
228
228
@@ -247,7 +247,7 @@ class gMonthDay(BuiltinType):
247
247
248
248
"""
249
249
250
- accepted_types = ( datetime .date , str )
250
+ accepted_types = [ datetime .date , str ]
251
251
_default_qname = xsd_ns ("gMonthDay" )
252
252
_pattern = re .compile (
253
253
r"^--(?P<month>\d\d)-(?P<day>\d\d)(?P<timezone>Z|[-+]\d\d:?\d\d)?$"
@@ -279,7 +279,7 @@ class gDay(BuiltinType):
279
279
280
280
"""
281
281
282
- accepted_types = ( datetime .date , str )
282
+ accepted_types = [ datetime .date , str ]
283
283
_default_qname = xsd_ns ("gDay" )
284
284
_pattern = re .compile (r"^---(?P<day>\d\d)(?P<timezone>Z|[-+]\d\d:?\d\d)?$" )
285
285
@@ -303,7 +303,7 @@ class gMonth(BuiltinType):
303
303
304
304
"""
305
305
306
- accepted_types = ( datetime .date , str )
306
+ accepted_types = [ datetime .date , str ]
307
307
_default_qname = xsd_ns ("gMonth" )
308
308
_pattern = re .compile (r"^--(?P<month>\d\d)(?P<timezone>Z|[-+]\d\d:?\d\d)?$" )
309
309
@@ -321,7 +321,7 @@ def pythonvalue(self, value):
321
321
322
322
323
323
class HexBinary (BuiltinType ):
324
- accepted_types = ( str ,)
324
+ accepted_types = [ str ]
325
325
_default_qname = xsd_ns ("hexBinary" )
326
326
327
327
@check_no_collection
@@ -333,7 +333,7 @@ def pythonvalue(self, value):
333
333
334
334
335
335
class Base64Binary (BuiltinType ):
336
- accepted_types = ( str ,)
336
+ accepted_types = [ str ]
337
337
_default_qname = xsd_ns ("base64Binary" )
338
338
339
339
@check_no_collection
@@ -345,7 +345,7 @@ def pythonvalue(self, value):
345
345
346
346
347
347
class AnyURI (BuiltinType ):
348
- accepted_types = ( str ,)
348
+ accepted_types = [ str ]
349
349
_default_qname = xsd_ns ("anyURI" )
350
350
351
351
@check_no_collection
@@ -357,7 +357,7 @@ def pythonvalue(self, value):
357
357
358
358
359
359
class QName (BuiltinType ):
360
- accepted_types = ( str ,)
360
+ accepted_types = [ str ]
361
361
_default_qname = xsd_ns ("QName" )
362
362
363
363
@check_no_collection
@@ -369,7 +369,7 @@ def pythonvalue(self, value):
369
369
370
370
371
371
class Notation (BuiltinType ):
372
- accepted_types = ( str ,)
372
+ accepted_types = [ str ]
373
373
_default_qname = xsd_ns ("NOTATION" )
374
374
375
375
@@ -427,7 +427,7 @@ class Entities(Entity):
427
427
428
428
class Integer (Decimal ):
429
429
_default_qname = xsd_ns ("integer" )
430
- accepted_types = ( int , float , str ) # type: ignore
430
+ accepted_types = [ int , float , str ]
431
431
432
432
def xmlvalue (self , value ):
433
433
return str (value )
0 commit comments