(arg)
| 52 | |
| 53 | |
| 54 | def validate_callback_arg(arg): |
| 55 | if not isinstance(getattr(arg, "component_property", None), str): |
| 56 | raise exceptions.IncorrectTypeException( |
| 57 | dedent( |
| 58 | f""" |
| 59 | component_property must be a string, found {arg.component_property!r} |
| 60 | """ |
| 61 | ) |
| 62 | ) |
| 63 | |
| 64 | if hasattr(arg, "component_event"): |
| 65 | raise exceptions.NonExistentEventException( |
| 66 | """ |
| 67 | Events have been removed. |
| 68 | Use the associated property instead. |
| 69 | """ |
| 70 | ) |
| 71 | |
| 72 | if isinstance(arg.component_id, dict): |
| 73 | validate_id_dict(arg) |
| 74 | |
| 75 | elif isinstance(arg.component_id, str): |
| 76 | validate_id_string(arg) |
| 77 | |
| 78 | else: |
| 79 | raise exceptions.IncorrectTypeException( |
| 80 | dedent( |
| 81 | f""" |
| 82 | component_id must be a string or dict, found {arg.component_id!r} |
| 83 | """ |
| 84 | ) |
| 85 | ) |
| 86 | |
| 87 | |
| 88 | def validate_id_dict(arg): |
no test coverage detected
searching dependent graphs…