Skip to content

run ruff#1245

Merged
zzstoatzz merged 1 commit into
mainfrom
fix-static-analysis
Nov 7, 2025
Merged

run ruff#1245
zzstoatzz merged 1 commit into
mainfrom
fix-static-analysis

Conversation

@zzstoatzz
Copy link
Copy Markdown
Collaborator

@zzstoatzz zzstoatzz commented Nov 7, 2025

clean up after #1243

Copilot AI review requested due to automatic review settings November 7, 2025 16:45
@zzstoatzz zzstoatzz merged commit d5114c0 into main Nov 7, 2025
7 checks passed
@zzstoatzz zzstoatzz deleted the fix-static-analysis branch November 7, 2025 16:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 9 to +12

from pydantic_ai.models.openai import OpenAIModel
from pydantic_ai.providers.openai import OpenAIProvider
from typing_extensions import TypedDict
Copy link

Copilot AI Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants