Skip to content

chore: remove redundant ternary in log_aggregator.py#2708

Merged
crivetimihai merged 1 commit intoIBM:mainfrom
SaaiAravindhRaja:fix/redundant-ternary-log-aggregator
Feb 6, 2026
Merged

chore: remove redundant ternary in log_aggregator.py#2708
crivetimihai merged 1 commit intoIBM:mainfrom
SaaiAravindhRaja:fix/redundant-ternary-log-aggregator

Conversation

@SaaiAravindhRaja
Copy link
Copy Markdown
Contributor

Closes #2367

Description

Removed redundant conditional expression where both branches returned the same value.

Changes

Before:

resolved_end = reference if window_end is None else reference

After:

resolved_end = reference

Testing

  • ruff check passes
  • pytest tests/unit/mcpgateway/services/test_log_aggregator_helpers.py passes (2/2)
  • Code formatted with black/isort

The conditional expression always returned the same value regardless
of the condition. Simplified to direct assignment.

Closes IBM#2367

Signed-off-by: ChaiAndCode <saaiaravindhraja@gmail.com>
@crivetimihai crivetimihai force-pushed the fix/redundant-ternary-log-aggregator branch from 72d287e to f16de8e Compare February 6, 2026 08:09
@crivetimihai crivetimihai merged commit c5faffc into IBM:main Feb 6, 2026
45 checks passed
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
The conditional expression always returned the same value regardless
of the condition. Simplified to direct assignment.

Closes IBM#2367

Signed-off-by: ChaiAndCode <saaiaravindhraja@gmail.com>
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.

[CLEANUP][SONAR][LOW]: Redundant ternary - both branches identical in log_aggregator.py

3 participants