Skip to content

chore: remove dead code, debug logging, and fix typos#17

Open
lakshith-403 wants to merge 1 commit into
mainfrom
feat/gracious-blackwell-569596
Open

chore: remove dead code, debug logging, and fix typos#17
lakshith-403 wants to merge 1 commit into
mainfrom
feat/gracious-blackwell-569596

Conversation

@lakshith-403

Copy link
Copy Markdown
Member

Mechanical, no-behavior-change cleanup surfaced by a code-quality review of the repository. Pure dead-code removal, a stray debug log, and typo/naming fixes — no functional logic touched.

Python — python/inspectus/__init__.py

  • Remove unused compress_series() (never called anywhere, not in __all__)
  • Remove unused loop counter i in distribution()
  • Simplify histogram = [dist[i] for i in range(0, 9)]dist.tolist(), dropping the shadowed comprehension variable and the hard-coded count 9
  • Fix distribution() docstring: alpha default is 0.5, not 0.6 (matches the signature)

TypeScript — ui/src/

  • charts.ts — remove dead chartsEmbedTest() scaffolding (unreferenced, hard-coded empty sample)
  • attention_matrix_view.ts — remove the unused attentions field and the now-unused createMatrix import
  • line_grid.ts — remove a leftover console.log('click', ...) in the click handler; fix typo selectHanlderselectHandler
  • controller.ts — rename doubled-word method calcGridAttentionAttentioncalcGridAttention (all 3 call sites)
  • token_loss.ts — remove a large commented-out menu dead-code block referencing a removed field

Verification

  • python -m py_compile passes on the changed modules
  • All 5 changed .ts files parse cleanly via esbuild
  • grep confirms no residual references to any removed/renamed symbol

Diff: 6 files, +8 / −76.

Note: this does not rebuild the bundled python/inspectus/static/js/charts.js artifact — that regenerates from ui/ on the normal build step.

🤖 Generated with Claude Code

Mechanical, no-behavior-change cleanup surfaced by a code-quality review.

Python (python/inspectus/__init__.py):
- Remove unused compress_series() (never called, not in __all__)
- Remove unused loop counter `i` in distribution()
- Simplify histogram build to dist.tolist(), dropping the shadowed
  comprehension variable and the magic count 9
- Fix distribution() docstring: alpha default is 0.5, not 0.6

TypeScript (ui/src):
- Remove dead chartsEmbedTest() scaffolding (charts.ts)
- Remove unused `attentions` field and now-unused createMatrix import
  (attention_matrix_view.ts)
- Remove leftover console.log in LineCellView click handler (line_grid.ts)
- Fix typo selectHanlder -> selectHandler (line_grid.ts)
- Rename doubled-word method calcGridAttentionAttention -> calcGridAttention
  (controller.ts)
- Remove large commented-out `menu` dead-code block (token_loss.ts)

No functional changes. Python compiles; changed TS files parse cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.

1 participant