(candidate)
| 14151 | return None |
| 14152 | |
| 14153 | def _score(candidate): |
| 14154 | _, user, stats = candidate |
| 14155 | if not isinstance(user, dict): |
| 14156 | return 0 |
| 14157 | score = 0 |
| 14158 | if user.get("id"): |
| 14159 | score += 3 |
| 14160 | if user.get("uniqueId"): |
| 14161 | score += 3 |
| 14162 | if user.get("nickname"): |
| 14163 | score += 3 |
| 14164 | if isinstance(stats, dict): |
| 14165 | if stats.get("followerCount") is not None: |
| 14166 | score += 2 |
| 14167 | if stats.get("followingCount") is not None: |
| 14168 | score += 2 |
| 14169 | if stats.get("heart") is not None: |
| 14170 | score += 1 |
| 14171 | return score |
| 14172 | |
| 14173 | candidates.sort(key=_score, reverse=True) |
| 14174 | _, user, stats = candidates[0] |
nothing calls this directly
no outgoing calls
no test coverage detected