Skip to content

refactor(conformance): drop redundant tuple() constructors (S7496) - #746

Merged
Brad-Edwards merged 1 commit into
devfrom
740-MOD-001-sonar-redundant-tuple
Jul 12, 2026
Merged

refactor(conformance): drop redundant tuple() constructors (S7496)#746
Brad-Edwards merged 1 commit into
devfrom
740-MOD-001-sonar-redundant-tuple

Conversation

@Brad-Edwards

Copy link
Copy Markdown
Collaborator

Why

The devmain promotion (PR #740) now fails SonarCloud on a single new
violation — python:S7496 "Remove the redundant tuple constructor call" at
aces_conformance/conformance.py. SonarCloud activated this rule since the earlier
scans, and it flags tuple((*a, *b)) where the inner starred expression is already
a tuple. (Not from the modularity split in #743 — this line came in with #741.)

What

Unwrap both occurrences in conformance.py:

capability_gaps = tuple((*surface_gaps, *claim_gaps))  ->  (*surface_gaps, *claim_gaps)
cases          = tuple((*fixture_report.cases, *target_cases))  ->  (*fixture_report.cases, *target_cases)

Semantically identical ((*a, *b) is already a tuple); the tuple(...) wrapper is
pure redundancy.

Verification

  • ruff check / format clean; conformance test suite green (83 passed).
  • Clears the last SonarCloud new_violations on PR Dev #740 (was 1).

Requirement: MOD-001 (code-quality cleanup).

…S7496)

SonarCloud activated python:S7496 and flagged the dev->main promotion (PR #740)
on tuple((*a, *b)) in aces_conformance/conformance.py, where the inner starred
expression is already a tuple. Unwrap both occurrences. No behaviour change.
@sonarqubecloud

Copy link
Copy Markdown

@Brad-Edwards
Brad-Edwards merged commit 8e1a6d3 into dev Jul 12, 2026
13 checks passed
@Brad-Edwards
Brad-Edwards deleted the 740-MOD-001-sonar-redundant-tuple branch July 12, 2026 18:41
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.

1 participant