@@ -35,43 +35,43 @@ def validate_callback(output, inputs, state, extra_args, types):
35
35
36
36
outputs = output if is_multi else [output ]
37
37
38
- for args , cls in [(outputs , Output ), (inputs , Input ), (state , State )]:
39
- validate_callback_args (args , cls )
38
+ for args in [outputs , inputs , state ]:
39
+ for arg in args :
40
+ validate_callback_arg (arg )
40
41
41
42
42
- def validate_callback_args (args , cls ):
43
- for arg in args :
44
- if not isinstance (getattr (arg , "component_property" , None ), _strings ):
45
- raise exceptions .IncorrectTypeException (
46
- """
47
- component_property must be a string, found {!r}
48
- """ .format (
49
- arg .component_property
50
- )
43
+ def validate_callback_arg (arg ):
44
+ if not isinstance (getattr (arg , "component_property" , None ), _strings ):
45
+ raise exceptions .IncorrectTypeException (
46
+ """
47
+ component_property must be a string, found {!r}
48
+ """ .format (
49
+ arg .component_property
51
50
)
51
+ )
52
52
53
- if hasattr (arg , "component_event" ):
54
- raise exceptions .NonExistentEventException (
55
- """
56
- Events have been removed.
57
- Use the associated property instead.
58
- """
59
- )
53
+ if hasattr (arg , "component_event" ):
54
+ raise exceptions .NonExistentEventException (
55
+ """
56
+ Events have been removed.
57
+ Use the associated property instead.
58
+ """
59
+ )
60
60
61
- if isinstance (arg .component_id , dict ):
62
- validate_id_dict (arg )
61
+ if isinstance (arg .component_id , dict ):
62
+ validate_id_dict (arg )
63
63
64
- elif isinstance (arg .component_id , _strings ):
65
- validate_id_string (arg )
64
+ elif isinstance (arg .component_id , _strings ):
65
+ validate_id_string (arg )
66
66
67
- else :
68
- raise exceptions .IncorrectTypeException (
69
- """
70
- component_id must be a string or dict, found {!r}
71
- """ .format (
72
- arg .component_id
73
- )
67
+ else :
68
+ raise exceptions .IncorrectTypeException (
69
+ """
70
+ component_id must be a string or dict, found {!r}
71
+ """ .format (
72
+ arg .component_id
74
73
)
74
+ )
75
75
76
76
77
77
def validate_id_dict (arg ):
0 commit comments