Skip to content

Fix next-pylint issue #39632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

dargilco
Copy link
Member

@dargilco dargilco commented Feb 8, 2025

Fix for GitHub issue "azure-ai-inference needs linting updates for pylint version 3.2.7" (#39270)

Running

>pip install "tox<5"
>tox run -e next-pylint -c ../../../eng/tox/tox.ini --root .

Resulted in this error:

************* Module azure.ai.inference.models._patch
azure\ai\inference\models\_patch.py:506: [C4763(do-not-import-asyncio), AsyncStreamingChatCompletions.__exit__] Do not import the asyncio package directly in your library

The fix is to make sure the async iterator class has the proper async exit method (__aexit__). I also made sure the "with context" pattern works with the streaming response object, by updating some of the streaming tests.

@github-actions github-actions bot added the AI Model Inference Issues related to the client library for Azure AI Model Inference (\sdk\ai\azure-ai-inference) label Feb 8, 2025
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-ai-inference

@dargilco dargilco self-assigned this Feb 8, 2025
@dargilco dargilco merged commit 92c36aa into feature/azure-ai-inference-beta9 Feb 10, 2025
21 checks passed
@dargilco dargilco deleted the dargilco/azure-ai-inference-pr-02-07-2025 branch February 10, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI Model Inference Issues related to the client library for Azure AI Model Inference (\sdk\ai\azure-ai-inference)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants