run ruff#1245
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR applies code formatting improvements to three AIML API example files. The changes focus on improving code style consistency by reformatting multi-line error messages and correcting import statement ordering.
- RuntimeError messages are split across multiple lines for better readability
- Import ordering is corrected to follow Python style conventions
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/provider_specific/aimlapi/tools_agent.py | Reformats RuntimeError message to multi-line format |
| examples/provider_specific/aimlapi/structured_output.py | Corrects import ordering and reformats RuntimeError message to multi-line format |
| examples/provider_specific/aimlapi/run_agent.py | Reformats RuntimeError message to multi-line format |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| from pydantic_ai.models.openai import OpenAIModel | ||
| from pydantic_ai.providers.openai import OpenAIProvider | ||
| from typing_extensions import TypedDict |
There was a problem hiding this comment.
The import from typing_extensions should be placed before the third-party pydantic_ai imports. According to PEP 8 import ordering conventions (enforced by Ruff's isort rules in this project), imports should be grouped as: (1) standard library, (2) related third party, (3) local application/library. The typing_extensions import belongs in the first group and should appear before the pydantic_ai imports. Move line 12 to be after the import os statement on line 8.
| from pydantic_ai.models.openai import OpenAIModel | |
| from pydantic_ai.providers.openai import OpenAIProvider | |
| from typing_extensions import TypedDict | |
| from typing_extensions import TypedDict | |
| from pydantic_ai.models.openai import OpenAIModel | |
| from pydantic_ai.providers.openai import OpenAIProvider |
clean up after #1243