@@ -136,13 +136,15 @@ def validate_function_params(params: dict, bound_params: dict,
136
136
if set (params ) - set (bound_params ):
137
137
raise FunctionLoadError (
138
138
func_name ,
139
- 'the following parameters are declared in Python but '
140
- f'not in function.json: { set (params ) - set (bound_params )!r} ' )
139
+ 'the following parameters are declared in Python '
140
+ 'but not in the function definition (function.json or '
141
+ f'function decorators): { set (params ) - set (bound_params )!r} ' )
141
142
142
143
if set (bound_params ) - set (params ):
143
144
raise FunctionLoadError (
144
145
func_name ,
145
- f'the following parameters are declared in function.json but '
146
+ 'the following parameters are declared in the function '
147
+ 'definition (function.json or function decorators) but '
146
148
f'not in Python: { set (bound_params ) - set (params )!r} ' )
147
149
148
150
input_types : typing .Dict [str , ParamTypeInfo ] = {}
@@ -221,7 +223,8 @@ def validate_function_params(params: dict, bound_params: dict,
221
223
raise FunctionLoadError (
222
224
func_name ,
223
225
f'binding { param .name } is declared to have the "in" '
224
- 'direction in function.json, but its annotation '
226
+ 'direction in the function definition (function.json '
227
+ 'or function decorators), but its annotation '
225
228
'is azure.functions.Out in Python' )
226
229
227
230
if param_has_anno and param_py_type in (str , bytes ) and (
@@ -244,13 +247,16 @@ def validate_function_params(params: dict, bound_params: dict,
244
247
func_name ,
245
248
f'{ param .name !r} binding type "{ binding .type } " '
246
249
f'and dataType "{ binding .data_type } " in '
247
- f'function.json do not match the corresponding '
250
+ 'function definition (function.json or function '
251
+ 'decorators) do not match the corresponding '
248
252
f'function parameter\' s Python type '
249
253
f'annotation "{ param_py_type .__name__ } "' )
250
254
else :
251
255
raise FunctionLoadError (
252
256
func_name ,
253
- f'type of { param .name } binding in function.json '
257
+ f'type of { param .name } binding in function '
258
+ 'definition (function.json or function '
259
+ 'decorators) '
254
260
f'"{ binding .type } " does not match its Python '
255
261
f'annotation "{ param_py_type .__name__ } "' )
256
262
0 commit comments