(value)
| 54 | |
| 55 | |
| 56 | def to_plain(value): |
| 57 | if isinstance(value, np.generic): |
| 58 | return value.item() |
| 59 | if hasattr(value, "tolist"): |
| 60 | return value.tolist() |
| 61 | if isinstance(value, dict): |
| 62 | return {str(key): to_plain(item) for key, item in value.items()} |
| 63 | if isinstance(value, (list, tuple)): |
| 64 | return [to_plain(item) for item in value] |
| 65 | if isinstance(value, (str, int, float, bool)) or value is None: |
| 66 | return value |
| 67 | return repr(value) |
| 68 | |
| 69 | |
| 70 | def issue_to_plain(issue) -> dict[str, Any]: |
no outgoing calls
no test coverage detected