Skip to content

Remove dead code surfaced by find_dead_code#8

Merged
kapillamba4 merged 1 commit into
mainfrom
chore/remove-dead-code
May 10, 2026
Merged

Remove dead code surfaced by find_dead_code#8
kapillamba4 merged 1 commit into
mainfrom
chore/remove-dead-code

Conversation

@kapillamba4
Copy link
Copy Markdown
Owner

@kapillamba4 kapillamba4 commented May 10, 2026

Summary

  • Drop 6 unreferenced functions identified by the find_dead_code MCP tool: upsert_symbol, upsert_reference, upsert_embedding (db.py), get_parser_logger, get_git_logger (logging_config.py), and validate_path_in_directory (validation.py)
  • Update the transaction() docstring example in db.py to reference upsert_file (the actual function used in parser.py:594) instead of the now-removed upsert_symbol
  • Net: 117 lines removed, 1 added across 3 files

Test plan

  • find_dead_code returns 0 candidates after the cleanup
  • pytest tests/test_validation.py tests/test_logging.py tests/test_errors.py — 59/59 pass
  • AST parses cleanly for all three edited files
  • No test files referenced any of the removed symbols
  • CI green on the PR

🤖 Generated with Claude Code

Drop six unreferenced functions:
- db.py: upsert_symbol, upsert_reference, upsert_embedding (parser.py
  performs writes inline through batch_insert_embeddings and direct
  cursor calls; these helpers had no callers)
- logging_config.py: get_parser_logger, get_git_logger
- validation.py: validate_path_in_directory

Also fix the transaction() docstring example to reference upsert_file,
which is the actual function used in parser.py:594.

Verified with the find_dead_code MCP tool (0 candidates after removal)
and pytest on the touched modules (59 tests pass).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kapillamba4 kapillamba4 merged commit 6bffd1d into main May 10, 2026
3 checks passed
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