(code: int, msg: str, data: Optional[T] = None)
| 95 | |
| 96 | |
| 97 | def check_send_master_info(code: int, msg: str, data: Optional[T] = None) -> bool: |
| 98 | if code in SEND_MASTER_INFO_CODES: |
| 99 | return True |
| 100 | |
| 101 | if code in NOT_SEND_MASTER_INFO_CODES: |
| 102 | return False |
| 103 | |
| 104 | import inspect |
| 105 | |
| 106 | callers = [f.function for f in inspect.stack()[5:8][::-1]] |
| 107 | logger.warning(f"[库洛签到·UID工具] {'.'.join(callers)} code: {code} msg: {msg} data: {data}") |
| 108 | return isinstance(msg, str) and msg != "" |
| 109 | |
| 110 | |
| 111 | class KuroApiResp(BaseModel, Generic[T]): |