Skip to content

refactor(dataflow): give declared-type reading its own home - #3554

Merged
swati510 merged 1 commit into
mainfrom
refactor/defuse-declared-types
Oct 11, 2026
Merged

swati510 merged 1 commit into
mainfrom
refactor/defuse-declared-types

Conversation

@RaghavChamadiya

Copy link
Copy Markdown
Member

BaseDefUseDialect (27 methods) read declared types over its own kind sets (type_holder_kinds / type_wrapper_kinds), a separate responsibility that kept its LCOM4 at 2 (low_cohesion, high).

That reading now lives in a small DeclaredTypes dataclass in base.py, exposed on each dialect as declared_types. Per-language overrides keep working: C++ (* / & / const) and TypeScript (optional parameter | undefined) subclass it in their own modules. The one outside caller, extract_method _declared_types, calls dialect.declared_types.of(node).

BaseDefUseDialect carried a second responsibility: reading the type written
at a declaration, over its own holder / wrapper kind sets. It now lives in a
small DeclaredTypes dataclass the dialect exposes as declared_types; the C++
and TypeScript tweaks become subclasses of it. Behaviour is unchanged.
@repowise-bot

repowise-bot Bot commented Oct 11, 2026

Copy link
Copy Markdown

Reviewed the whole diff: nothing to fix.

✅ Health of changed files: 5.1 (unchanged)
56% of the added lines moved unchanged from other files, so this mostly reflects the new file layout.

Check Result
Coverage Waiting for this PR's CI to upload a report (last report from this repo just now)
Tests 8 of 8 changed code files reached by a test · which tests
Security No new findings on changed lines
Doc drift No drift in docs this PR edits

📊 See the full report for this PR
Blast radius, every caller of the contracts it changes, and health before and after. No sign-in.
Reviewed with AI · Plain markdown for agents

Settings and updates

Updated 2026-10-11 19:16 UTC
Silence one PR with [skip repowise] in the title · Bot settings
⭐ Star Repowise · 📥 Install on another repo

@swati510
swati510 merged commit ee4df5c into main Oct 11, 2026
10 checks passed
@swati510
swati510 deleted the refactor/defuse-declared-types branch October 11, 2026 19:16
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.

2 participants