(self, player_name: str, path: str, *, timeout: float, max_errors: int)
| 222 | |
| 223 | class PolicyController: |
| 224 | def __init__(self, player_name: str, path: str, *, timeout: float, max_errors: int): |
| 225 | self.player_name = player_name |
| 226 | self.path = path |
| 227 | self.timeout = max(float(timeout), 0.01) |
| 228 | self.max_errors = max(int(max_errors), 1) |
| 229 | self.disabled = False |
| 230 | self.decisions = 0 |
| 231 | self.policy_errors = 0 |
| 232 | self.invalid_decisions = 0 |
| 233 | self.error_samples: list[dict[str, str]] = [] |
| 234 | self.startup_error: str | None = None |
| 235 | self._next_request_id = 0 |
| 236 | self._start_worker() |
| 237 | |
| 238 | def _start_worker(self) -> None: |
| 239 | self.startup_error = None |
nothing calls this directly
no test coverage detected