[Monitor Opentelemetry] Format Azure Monitor Opentelemetry code#44462
[Monitor Opentelemetry] Format Azure Monitor Opentelemetry code#44462hectorhdzg merged 11 commits intoAzure:mainfrom
Conversation
|
is |
There was a problem hiding this comment.
Pull request overview
This PR applies the Black code formatter to the Azure Monitor OpenTelemetry codebase to ensure consistent code formatting across all Python files. The changes are purely cosmetic and focused on improving code style consistency.
Key Changes
- Reformatted function signatures to comply with Black's line length and formatting rules
- Added/removed blank lines according to Black's standards
- Adjusted string formatting and quote consistency
- Reformatted multi-line function calls and dictionary definitions
Reviewed changes
Copilot reviewed 89 out of 94 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test_utils.py | Reformatted function signatures to single lines |
| test_configurations.py | Added blank lines, fixed trailing commas, removed trailing whitespace |
| test_configure.py | Reformatted multi-line patch.dict calls and function arguments |
| test_psycopg2.py | Removed blank line after class definition |
| test_status_logger.py | Removed blank line after function definition |
| test_diagnostic_logging.py | Reformatted multi-line with statements |
| modify_spans.py | Removed blank line after class definition |
| http_requests.py | Added space before inline comment |
| filter_spans.py | Added space before inline comment, removed blank line |
| live_metrics.py | Added space before inline comment |
| custom_event.py | Reformatted multi-line function call |
| basic.py | Added trailing comma |
| test_instrumentation.py | Added blank lines between functions |
| test_configurations.py (utils) | Added blank lines, fixed trailing commas |
| _configure.py | Fixed trailing whitespace, reformatted imports |
| test_trace_utils.py | Added blank lines, removed trailing whitespace |
| test_trace.py | Reformatted dictionary literals |
| test_sampling.py | Removed blank line after class definition |
| test_rate_limited_sampling.py | Extensive reformatting of function calls and hex literals |
| test_utils.py (exporter) | Reformatted patch.dict calls |
| test_storage.py | Added blank lines, reformatted patch calls |
| test_connection_string_parser.py | Reformatted string concatenation |
| test_base_exporter.py | Reformatted patch.dict calls and multi-line statements |
| test_base_customer_sdkstats.py | Added blank lines, reformatted patch calls |
| test_statsbeat.py | Added blank lines, reformatted function signatures |
| test_metrics.py (statsbeat) | Added blank lines |
| test_manager.py | Removed blank lines, reformatted function signatures |
| test_validate.py | Removed blank line after class definition |
| test_types.py | Removed blank lines, reformatted dictionary literals |
| test_projection.py | Moved blank line |
| test_processor.py (quickpulse) | Added blank line, removed trailing blank line |
| test_policy.py | Removed blank line after class definition |
| test_manager.py (quickpulse) | Added blank lines, reformatted function signatures |
| test_live_metrics.py | Reformatted function calls |
| test_filter.py | Fixed string quotes in patch decorators |
| test_cpu.py | Removed blank line, added blank line at end |
| test_processor.py (performance) | Added blank lines |
| test_performance_counters.py | Added blank lines, reformatted function signatures |
| test_constants.py | Reformatted import statement |
| test_metrics.py (metrics) | Reformatted patch.dict calls |
| test_processor.py (logs) | Reformatted function calls and patch statements |
| test_logs.py | Added blank line |
| test_customer_sdkstats.py | Added blank lines, fixed string quotes |
| test_worker.py | Fixed string quotes in patch calls |
| sample_custom_event.py | Reformatted multi-line function call |
The formatting changes are consistent with Black's standards and do not introduce any functional changes to the code. All changes are purely cosmetic improvements to code style and readability.
pvaneck
left a comment
There was a problem hiding this comment.
Probably worth opting in to running black in the CI at this point.
Also, black shifted some pylint disable comments which is why pylint has some failures now. I've made some inline suggestions to address these.
...monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
Outdated
Show resolved
Hide resolved
...nitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_configuration/__init__.py
Outdated
Show resolved
Hide resolved
...re-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/statsbeat/_manager.py
Outdated
Show resolved
Hide resolved
...tor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/statsbeat/customer/_utils.py
Outdated
Show resolved
Hide resolved
...r-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/statsbeat/customer/_manager.py
Outdated
Show resolved
Hide resolved
...r-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/statsbeat/customer/_manager.py
Outdated
Show resolved
Hide resolved
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Ran https://pypi.org/project/black/ to format code