[Core] Other Pylint Fixes - #48476
Open
Kashif Khan (kashifkhan) wants to merge 13 commits into
Open
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 8 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Kashif Khan (kashifkhan)
marked this pull request as ready for review
August 7, 2026 14:25
Kashif Khan (kashifkhan)
requested review from
iscai-msft and
Jeff Fisher (xirzec)
as code owners
August 7, 2026 14:25
|
Azure Pipelines: Successfully started running 3 pipeline(s). 8 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Kashif Khan (kashifkhan)
requested review from
jenny (JennyPng) and
Libba Lawrence (l0lawrence)
August 7, 2026 14:27
Contributor
There was a problem hiding this comment.
Pull request overview
Addresses Pylint findings across Azure Core tests, test infrastructure, and samples.
Changes:
- Simplifies assertions, branches, comprehensions, and resource handling.
- Adds targeted Pylint suppressions and missing imports.
- Removes unreachable code and adds licensing metadata.
Reviewed changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tests/utils.py |
Uses idiomatic method type checking. |
tests/testserver_tests/coretestserver/coretestserver/test_routes/xml_route.py |
Simplifies route branching. |
tests/testserver_tests/coretestserver/coretestserver/test_routes/helpers.py |
Adds Base64 import and simplifies helpers. |
tests/test_universal_pipeline.py |
Suppresses statement-count warning. |
tests/test_tracing_policy.py |
Suppresses transport import warning. |
tests/test_testserver.py |
Suppresses transport import warning. |
tests/test_streaming.py |
Suppresses transport import warning. |
tests/test_stream_generator.py |
Handles exhausted reads explicitly. |
tests/test_serialization.py |
Simplifies branches and assertions. |
tests/test_retry_policy.py |
Improves temporary-file handling and assertions. |
tests/test_rest_stream_responses.py |
Simplifies stream collection and property access. |
tests/test_rest_response_backcompat.py |
Suppresses transport import warning. |
tests/test_rest_http_response.py |
Suppresses response import warning. |
tests/test_rest_http_request.py |
Simplifies iterator and header assertions. |
tests/test_rest_headers.py |
Simplifies empty-header assertion. |
tests/test_requests_universal.py |
Suppresses transport import warning. |
tests/test_pipeline.py |
Suppresses transport import warning. |
tests/test_paging.py |
Removes unnecessary else branches. |
tests/test_exceptions.py |
Simplifies empty-value assertions. |
tests/test_basic_transport.py |
Suppresses transport import warning. |
tests/test_base_polling.py |
Simplifies mock dispatch branches. |
tests/specs_sdk/modeltypes/modeltypes/_utils/model_base.py |
Revises optional-type detection. |
tests/perf_tests/_test_base.py |
Suppresses transport import warning. |
tests/async_tests/test_universal_http_async.py |
Removes unreachable assertion. |
tests/async_tests/test_testserver_async.py |
Suppresses transport import warning. |
tests/async_tests/test_stream_generator_async.py |
Suppresses transport import warning. |
tests/async_tests/test_retry_policy_async.py |
Improves file handling and assertions. |
tests/async_tests/test_rest_trio_transport.py |
Suppresses transport import warning. |
tests/async_tests/test_rest_stream_responses_async.py |
Simplifies asynchronous stream collection. |
tests/async_tests/test_rest_response_backcompat_async.py |
Suppresses transport import warning. |
tests/async_tests/test_rest_http_response_async.py |
Suppresses module import warning. |
tests/async_tests/test_rest_http_request_async.py |
Simplifies header assertions. |
tests/async_tests/test_rest_headers_async.py |
Simplifies empty-header assertion. |
tests/async_tests/test_rest_asyncio_transport.py |
Suppresses transport import warning. |
tests/async_tests/test_request_trio.py |
Preserves exception chaining. |
tests/async_tests/test_request_asyncio.py |
Suppresses transport import warning. |
tests/async_tests/test_pipeline_async.py |
Suppresses transport import warning. |
tests/async_tests/test_paging_async.py |
Removes unnecessary else branches. |
tests/async_tests/test_http_logging_policy_async.py |
Suppresses statement-count warnings. |
tests/async_tests/test_basic_transport_async.py |
Removes unnecessary f-strings. |
tests/async_tests/test_base_polling_async.py |
Simplifies mock dispatch branches. |
samples/test_example_sync.py |
Suppresses protected-access warning. |
samples/test_example_sansio.py |
Suppresses protected-access warning. |
samples/test_example_async.py |
Suppresses protected-access warning. |
samples/example_tracing_async.py |
Adds the standard license header. |
Libba Lawrence (l0lawrence)
approved these changes
Aug 7, 2026
jenny (JennyPng)
approved these changes
Aug 7, 2026
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.
Part 2 of next-pylint fixes - these focus on adding some more disables, simplifying if/elif statements, asserts on empty objects