(self, ip: str)
| 81 | return True |
| 82 | |
| 83 | def add_ip(self, ip: str) -> int: |
| 84 | ip_info = self.ips.get(ip, {"count": 0, "time": datetime.now()}) |
| 85 | ip_info["count"] += 1 |
| 86 | ip_info["time"] = datetime.now() |
| 87 | self.ips[ip] = ip_info |
| 88 | return ip_info["count"] |
| 89 | |
| 90 | async def remove_expired_ip(self) -> None: |
| 91 | now = datetime.now() |
no outgoing calls
no test coverage detected