-
Notifications
You must be signed in to change notification settings - Fork 3.2k
App Config SDK/Provider Pylint Updates #45050
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
There was a problem hiding this 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 addresses pylint version 4.0.4 compliance issues for the azure-appconfiguration and azure-appconfiguration-provider packages as part of issue #44708. The changes focus on fixing linting warnings without altering functionality.
Changes:
- Reordered imports to follow consistent pattern: stdlib, third-party, local modules, azure packages
- Added pylint disable comments for classes with many public methods
- Refactored test code to use setup methods instead of inline context managers
- Converted instance methods to static methods where appropriate
- Removed unused imports and parameters
- Fixed missing return statement in sample utility function
Reviewed changes
Copilot reviewed 55 out of 56 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| test_query_param_policy.py | Reordered imports, removed unused return statement, attempted to split long lines with multi-line strings (introduces bugs) |
| test_consistency.py | Reordered imports |
| test_azure_appconfiguration_client_async.py | Reordered imports, added pylint disable, refactored context manager usage, attempted error message line splitting (introduces bugs), added staticmethod decorator |
| test_azure_appconfiguration_client_aad_async.py | Reordered imports, added pylint disable, attempted error message line splitting (introduces bugs), split long comment |
| test_azure_appconfiguration_client_aad.py | Reordered imports, added pylint disable, attempted error message line splitting (introduces bugs) |
| test_azure_appconfiguration_client.py | Reordered imports, added pylint disable, removed unused imports, refactored context manager usage, attempted error message line splitting (introduces bugs), fixed SecretReferenceConfigurationSetting test, added staticmethod decorator |
| test_audience_policy.py | Reordered imports |
| test_audience_error_handling_live_async.py | Reordered imports, removed unused imports |
| test_audience_error_handling_live.py | Reordered imports, removed unused imports |
| preparers.py (azure-appconfiguration) | Reordered imports, attempted connection string line splitting (introduces bugs) |
| perfstress_tests/set.py | Removed unused import |
| perfstress_tests/get.py | Removed unused import |
| asynctestcase.py | Reordered imports |
| snapshot_sample_async.py | Reordered imports, split long docstring |
| snapshot_sample.py | Reordered imports, split long docstring |
| hello_world_sample_entra_id_and_bleu.py | Split long docstring, changed environment variable name (introduces documentation inconsistency) |
| hello_world_entra_id_sample.py | Changed environment variable name (introduces documentation inconsistency) |
| conditional_operation_sample.py | Fixed early return pattern |
| testcase.py (azure-appconfiguration-provider) | Reordered imports |
| test_tag_filters.py | Reordered imports, removed unused import |
| test_snapshots.py | Removed unused import |
| test_request_tracing_context.py | Added pylint disable comment (missing space) |
| test_provider_refresh.py | Reordered imports |
| test_provider_feature_management.py | Reordered imports |
| test_provider_aad.py | Reordered imports |
| test_provider.py | Reordered imports, removed unused parameter |
| test_json.py | Minor whitespace fix in test string |
| test_discovery.py | Reordered imports |
| test_configuration_client_manager_load_balance.py | Reordered imports |
| test_configuration_client_manager.py | Reordered imports |
| key_vault/test_secret_refresh.py | Reordered imports |
| key_vault/test_secret_provider.py | Reordered imports |
| aio/test_configuration_async_client_manager_load_balance.py | Reordered imports |
| aio/test_configuration_async_client_manager.py | Reordered imports, split long patch decorator paths |
| aio/test_async_snapshots.py | Removed unused import |
| aio/test_async_provider_refresh.py | Reordered imports |
| aio/test_async_provider_feature_management.py | Reordered imports |
| aio/test_async_provider_aad.py | Reordered imports |
| aio/test_async_provider.py | Reordered imports, split long comment |
| aio/test_async_discovery.py | Reordered imports, removed unused import |
| aio/key_vault/test_async_secret_refresh.py | Reordered imports, removed unused import |
| aio/key_vault/test_async_secret_provider.py | Reordered imports |
| samples/snapshot_sample.py (provider) | Removed unused import |
| samples/sample_utilities.py | Added missing return statement |
| samples/refresh_sample_feature_flags.py | Reordered imports, changed unused parameter to underscore, split long comment |
| samples/refresh_sample.py | Reordered imports, changed unused parameter to underscore, split long comment |
| samples/key_vault_reference_sample.py | Reordered imports |
| samples/key_vault_reference_customized_clients_sample.py | Reordered imports |
| samples/connection_string_sample.py | Reordered imports |
| samples/async_snapshot_sample.py | Reordered imports |
| samples/async_key_vault_reference_sample.py | Reordered imports |
| samples/async_key_vault_reference_provided_clients_sample.py | Reordered imports |
| samples/async_connection_string_sample.py | Reordered imports |
| samples/async_aad_sample.py | Reordered imports |
| samples/aad_sample.py | Reordered imports |
Description
Part 1 of updates for #44708, a second PR needs to be created to update the sanitation steps.
Note: Only samples/tests have been modified as part of this change.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines