Fix basedpyright type errors (#25435)

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
-LAN-
2025-09-10 01:54:26 +08:00
committed by GitHub
parent 2ac7a9c8fc
commit 08dd3f7b50
100 changed files with 847 additions and 497 deletions

View File

@ -1840,8 +1840,14 @@ class ProviderConfigurations(BaseModel):
def __setitem__(self, key, value):
self.configurations[key] = value
def __contains__(self, key):
if "/" not in key:
key = str(ModelProviderID(key))
return key in self.configurations
def __iter__(self):
return iter(self.configurations)
# Return an iterator of (key, value) tuples to match BaseModel's __iter__
yield from self.configurations.items()
def values(self) -> Iterator[ProviderConfiguration]:
return iter(self.configurations.values())