Skip to content

[Core] Other Pylint Fixes - #48476

Open
Kashif Khan (kashifkhan) wants to merge 13 commits into
Azure:mainfrom
kashifkhan:azcore_next_pylint
Open

[Core] Other Pylint Fixes#48476
Kashif Khan (kashifkhan) wants to merge 13 commits into
Azure:mainfrom
kashifkhan:azcore_next_pylint

Conversation

@kashifkhan

@kashifkhan Kashif Khan (kashifkhan) commented Aug 6, 2026

Copy link
Copy Markdown
Member

Part 2 of next-pylint fixes - these focus on adding some more disables, simplifying if/elif statements, asserts on empty objects

@azure-pipelines

Copy link
Copy Markdown
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.

@kashifkhan
Kashif Khan (kashifkhan) marked this pull request as ready for review August 7, 2026 14:25
Copilot AI balanced review requested due to automatic review settings August 7, 2026 14:25
@azure-pipelines

Copy link
Copy Markdown
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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread sdk/core/azure-core/tests/async_tests/test_universal_http_async.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants