refactor: improve config loader validation with Pydantic schemas
- Replace manual field type validation with Pydantic model schemas - Add pydantic>=2.0 as core dependency - Fix sync wrapper in decorator to properly handle rate limiting - Update pyright settings for stricter type checking - Fix repository URL in pyproject.toml - Remove unused main.py - Update test assertions for new validation error format
This commit is contained in:
@@ -89,6 +89,8 @@ class TokenBucketAlgorithm(BaseAlgorithm):
|
||||
remaining=int(tokens),
|
||||
reset_at=now + self.window_size,
|
||||
window_size=self.window_size,
|
||||
retry_after = (1 - tokens) / self.refill_rate
|
||||
|
||||
)
|
||||
|
||||
tokens = float(state.get("tokens", self.burst_size))
|
||||
|
||||
Reference in New Issue
Block a user