@@ -57,8 +57,8 @@ def _deserialize(self, *args, **kwargs): # pylint: disable=arguments-differ
57
57
58
58
59
59
class StripWhitespaceMixin :
60
- @pre_load
61
- def strip_whitespace (self , items ): # pylint: disable=no-self-use
60
+ @pre_load ()
61
+ def strip_whitespace (self , items , ** kwargs ): # pylint: disable=no-self-use
62
62
for key , value in items .items ():
63
63
if isinstance (value , str ):
64
64
items [key ] = value .strip ()
@@ -68,33 +68,41 @@ def strip_whitespace(self, items): # pylint: disable=no-self-use
68
68
class RunnerMetadataSchema (Schema , StripWhitespaceMixin ):
69
69
"""Metadata which is required for the operation of runner itself"""
70
70
71
- jti = VALIDATORS ["uuid" ]()
72
- ru_ref = VALIDATORS ["string" ](validate = validate .Length (min = 1 ))
73
- collection_exercise_sid = VALIDATORS ["string" ](validate = validate .Length (min = 1 ))
74
- tx_id = VALIDATORS ["uuid" ]()
75
- questionnaire_id = VALIDATORS ["string" ](validate = validate .Length (min = 1 ))
76
- response_id = VALIDATORS ["string" ](validate = validate .Length (min = 1 ))
77
-
78
- account_service_url = VALIDATORS ["url" ](required = False )
79
- case_id = VALIDATORS ["uuid" ](required = False )
80
- account_service_log_out_url = VALIDATORS ["url" ](required = False )
71
+ jti = VALIDATORS ["uuid" ]() # type:ignore
72
+ ru_ref = VALIDATORS ["string" ](validate = validate .Length (min = 1 )) # type:ignore
73
+ collection_exercise_sid = VALIDATORS ["string" ](
74
+ validate = validate .Length (min = 1 )
75
+ ) # type:ignore
76
+ tx_id = VALIDATORS ["uuid" ]() # type:ignore
77
+ questionnaire_id = VALIDATORS ["string" ](
78
+ validate = validate .Length (min = 1 )
79
+ ) # type:ignore
80
+ response_id = VALIDATORS ["string" ](validate = validate .Length (min = 1 )) # type:ignore
81
+
82
+ account_service_url = VALIDATORS ["url" ](required = False ) # type:ignore
83
+ case_id = VALIDATORS ["uuid" ](required = False ) # type:ignore
84
+ account_service_log_out_url = VALIDATORS ["url" ](required = False ) # type:ignore
81
85
roles = fields .List (fields .String (), required = False )
82
- survey_url = VALIDATORS ["url" ](required = False )
83
- language_code = VALIDATORS ["string" ](required = False )
84
- channel = VALIDATORS ["string" ](required = False , validate = validate .Length (min = 1 ))
85
- case_type = VALIDATORS ["string" ](required = False )
86
+ survey_url = VALIDATORS ["url" ](required = False ) # type:ignore
87
+ language_code = VALIDATORS ["string" ](required = False ) # type:ignore
88
+ channel = VALIDATORS ["string" ](
89
+ required = False , validate = validate .Length (min = 1 )
90
+ ) # type:ignore
91
+ case_type = VALIDATORS ["string" ](required = False ) # type:ignore
86
92
87
93
# Either schema_name OR the three census parameters are required. Should be required after census.
88
- schema_name = VALIDATORS ["string" ](required = False )
94
+ schema_name = VALIDATORS ["string" ](required = False ) # type:ignore
89
95
90
96
# The following three parameters can be removed after Census
91
97
survey = VALIDATORS ["string" ](
92
98
required = False , validate = validate .OneOf (("CENSUS" , "CCS" )), missing = "CENSUS"
93
- )
99
+ ) # type:ignore
94
100
form_type = VALIDATORS ["string" ](
95
101
required = False , validate = validate .OneOf (("H" , "I" , "C" ))
96
- )
97
- region_code = VALIDATORS ["string" ](required = False , validate = RegionCode ())
102
+ ) # type:ignore
103
+ region_code = VALIDATORS ["string" ](
104
+ required = False , validate = RegionCode ()
105
+ ) # type:ignore
98
106
99
107
@validates_schema
100
108
def validate_schema_name (self , data , ** kwargs ):
0 commit comments