Skip to content

fix: minor style/consistency cleanups#84

Merged
GoodbyePlanet merged 1 commit into
mainfrom
cleanup/style-consistency-80
Jul 6, 2026
Merged

fix: minor style/consistency cleanups#84
GoodbyePlanet merged 1 commit into
mainfrom
cleanup/style-consistency-80

Conversation

@GoodbyePlanet

Copy link
Copy Markdown
Owner

Summary

  • Hoist import re out of the per-decorator loop in _get_fastapi_route (server/parser/python.py)
  • fetch_commits_with_diffs now accepts an optional client and uses the _client_ctx pattern its siblings follow, instead of always opening its own httpx.AsyncClient (server/indexer/github_source.py)
  • Import get_embedding_provider from server.embeddings in history.py to match search.py's import path, instead of server.embeddings.factory

The fourth item from the issue (a shared TreeSitterParser base class to de-duplicate boilerplate across the 21 language parsers) was intentionally left out — the issue itself flags it as lower priority since per-language node logic genuinely differs, and it's a much larger, riskier refactor better suited to its own PR.

Fixes #80

Test plan

  • uv run pytest — 217 passed

- Hoist `import re` out of the per-decorator loop in _get_fastapi_route
- Have fetch_commits_with_diffs accept an optional client and use the
  _client_ctx pattern its siblings follow, instead of always opening
  its own httpx.AsyncClient
- Import get_embedding_provider from server.embeddings in history.py
  to match search.py, instead of server.embeddings.factory

Fixes #80

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@GoodbyePlanet GoodbyePlanet merged commit 5856895 into main Jul 6, 2026
2 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.

Minor style/consistency cleanups

1 participant