@@ -136,13 +136,15 @@ def validate_function_params(params: dict, bound_params: dict,
136136 if set (params ) - set (bound_params ):
137137 raise FunctionLoadError (
138138 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} ' )
141142
142143 if set (bound_params ) - set (params ):
143144 raise FunctionLoadError (
144145 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 '
146148 f'not in Python: { set (bound_params ) - set (params )!r} ' )
147149
148150 input_types : typing .Dict [str , ParamTypeInfo ] = {}
@@ -221,7 +223,8 @@ def validate_function_params(params: dict, bound_params: dict,
221223 raise FunctionLoadError (
222224 func_name ,
223225 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 '
225228 'is azure.functions.Out in Python' )
226229
227230 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,
244247 func_name ,
245248 f'{ param .name !r} binding type "{ binding .type } " '
246249 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 '
248252 f'function parameter\' s Python type '
249253 f'annotation "{ param_py_type .__name__ } "' )
250254 else :
251255 raise FunctionLoadError (
252256 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) '
254260 f'"{ binding .type } " does not match its Python '
255261 f'annotation "{ param_py_type .__name__ } "' )
256262
0 commit comments