Fix new pylint version 4.0.4 errors in exporter#44821
Closed
rads-1996 wants to merge 8 commits intoAzure:mainfrom
Closed
Fix new pylint version 4.0.4 errors in exporter#44821rads-1996 wants to merge 8 commits intoAzure:mainfrom
rads-1996 wants to merge 8 commits intoAzure:mainfrom
Conversation
a538e25 to
2eb01ac
Compare
532cd4f to
e658207
Compare
e658207 to
574f4a5
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses pylint 4.0.4 compatibility issues across the azure-monitor-opentelemetry-exporter package. The changes are purely maintenance-focused to resolve new linting errors introduced in pylint version 4.0.4.
Changes:
- Added appropriate pylint disable comments for valid suppressions (name-too-long, unused-argument, protected-access, etc.)
- Fixed mutable default arguments (e.g.,
headers={}changed toheaders=None) - Added missing
selfparameters to class methods - Prefixed unused variables with underscore
- Reformatted long lines and strings to comply with line length limits
- Reordered imports to follow proper conventions
Reviewed changes
Copilot reviewed 76 out of 76 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test files (tests/*) | Added pylint disable comments for test-specific patterns like name-too-long, too-many-public-methods, protected-access, and prefixed unused mock parameters with underscore |
| test_base_exporter.py | Fixed mutable default argument in MockResponse.init and added missing self parameter to mock class methods |
| test_storage.py | Uncommented assertion that was previously disabled, fixed isinstance checks, and added broad-exception-caught disables |
| sample files (samples/*) | Reordered imports to follow proper conventions and added pylint disable comments for sample-specific patterns |
| statsbeat/_utils.py | Added do-not-log-exceptions-if-not-debug disables for warning logs with exceptions |
| export/_base.py | Added do-not-log-exceptions-if-not-debug and do-not-use-logging-exception disables, plus unidiomatic-typecheck for valid type(None) check |
| _quickpulse/_exporter.py | Added do-not-log-exceptions-if-not-debug disables for exception logging |
| _performance_counters/_manager.py | Added do-not-use-logging-exception disables for logger.exception calls |
| _configuration/*.py | Added do-not-log-exceptions-if-not-debug disables for exception warning logs |
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.
No description provided.