Fix pylint 4.0.4 linting errors in azure-ai-contentsafety#47736
Open
sunghyun1999 wants to merge 1 commit into
Open
Fix pylint 4.0.4 linting errors in azure-ai-contentsafety#47736sunghyun1999 wants to merge 1 commit into
sunghyun1999 wants to merge 1 commit into
Conversation
Fix linting errors flagged by the upcoming pylint 4.0.4 upgrade: - tests/test_blocklist.py: fix import order and grouping (C0411, C0412) - tests/test_case.py: fix import order and grouping (C0411, C0412) - tests/test_content_safety.py: fix import order (C0411) - samples/sample_manage_blocklist.py: fix line-too-long (C0301) Fixes Azure#33222 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thank you for your contribution @sunghyun1999! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes pylint 4.0.4 lint errors in azure-ai-contentsafety ahead of the 2026-07-13 pylint upgrade deadline (issue #33222). The changes are limited to test and sample files: reordering imports to satisfy C0411/C0412 and breaking over-length lines to satisfy C0301. No production library code is touched, so the change is low-risk.
Changes:
- Reorder imports in three test files so third-party imports precede grouped/alphabetized first-party
azure.*imports. - Split three lines exceeding the 120-char limit in the sample into multi-line f-strings and a multi-line comment.
- All previously imported symbols are preserved; no functional changes.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/test_content_safety.py | Reorder/group imports; alphabetize model imports (all 7 retained) |
| tests/test_case.py | Group azure.* imports; sort within group |
| tests/test_blocklist.py | Reorder imports; alphabetize model imports |
| samples/sample_manage_blocklist.py | Break 3 long lines (2 f-strings, 1 comment) into multiple lines |
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix pylint errors in
azure-ai-contentsafetyfor the upcoming pylint 4.0.4 upgrade (deadline: 2026-07-13).Changes
devtools_testutils,test_case) before first-party imports (azure.*). Groupazureimports together. (C0411, C0412)azureimports together. (C0411, C0412)Fixes #33222
🤖 Generated with Claude Code