chore(sonar): remove dead store max_duration#2684
Conversation
Signed-off-by: oaslananka <169144131+oaslananka@users.noreply.github.com>
|
Scope: remove dead store flagged by Sonar (python:S1854) only. No functional change. CI checks green (DCO). |
There was a problem hiding this comment.
Pull request overview
Removes an unused reassignment of max_duration in the PostgreSQL latency heatmap calculation to address Sonar rule python:S1854 (dead store).
Changes:
- Deleted the unused
max_duration = min_duration + 1.0assignment in thelatency_range == 0branch. - Preserved the existing
latency_rangefallback behavior to avoid zero-sized latency buckets.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Clean fix — confirmed that Note: only the DCO check appears to have run — can you confirm CI (lint/tests) passed or are you seeing the same? |
|
Confirmed: I’m seeing the same on GitHub for this PR—only the DCO check shows up as required/ran. Locally verified on Windows 11 (PowerShell 7.5.4) with: python -m compileall mcpgateway (passes). |
Signed-off-by: oaslananka <169144131+oaslananka@users.noreply.github.com>
Fixes #2371
Removes a dead store flagged by Sonar (python:S1854): max_duration was reassigned in the latency_range==0 branch but never used after.
Testing: