(obj_type: type | str, as_tuple: bool = False)
| 179 | |
| 180 | |
| 181 | def get_dummy_object(obj_type: type | str, as_tuple: bool = False) -> object: |
| 182 | obj_type_name = obj_type.__name__ if isinstance(obj_type, type) else obj_type |
| 183 | if (return_value := _PREPARED_DUMMY_OBJECTS.get(obj_type_name)) is None: |
| 184 | raise ValueError( |
| 185 | f"Dummy object of type '{obj_type_name}' not found. Please add it manually." |
| 186 | ) |
| 187 | |
| 188 | if as_tuple: |
| 189 | return (return_value,) |
| 190 | return return_value |
| 191 | |
| 192 | |
| 193 | _RETURN_TYPES: TypeAlias = bool | int | str | dict[str, object] |
no outgoing calls
searching dependent graphs…