Skip to content

Commit ad7bd60

Browse files
committed
Fix lint rules
1 parent be21c24 commit ad7bd60

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pydantic_ai_slim/pydantic_ai/models/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,13 +630,18 @@ def override_allow_model_requests(allow_model_requests: bool) -> Iterator[None]:
630630

631631
@dataclass
632632
class ModelClassInformation:
633+
"""Metadata of model as parsed from string with the model class and provider class for instantiation."""
633634
model_class: type[Model]
635+
"""The raw model class"""
634636
provider_class: type[Provider[Any]] | None
637+
"""The raw provider class"""
635638
model_name: str
639+
"""The model name as parsed from input string"""
636640
provider_name: str | None
641+
"""The provider name as parsed from input string"""
637642

638643

639-
def infer_provider_model_class(model: KnownModelName | str) -> ModelClassInformation:
644+
def infer_provider_model_class(model: KnownModelName | str) -> ModelClassInformation: # C901
640645
"""Infer the model and provider from the name."""
641646
if model == 'test':
642647
from .test import TestModel

pydantic_ai_slim/pydantic_ai/providers/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __repr__(self) -> str:
5151
return f'{self.__class__.__name__}(name={self.name}, base_url={self.base_url})' # pragma: lax no cover
5252

5353

54-
def infer_provider_class(provider: str) -> type[Provider[Any]]:
54+
def infer_provider_class(provider: str) -> type[Provider[Any]]: # C901
5555
"""Infers the provider class from the provider name."""
5656
if provider in ('openai', 'openai-chat', 'openai-responses'):
5757
from .openai import OpenAIProvider

0 commit comments

Comments
 (0)