Title: Index out of bound in case of tree sitter based unused import code · Issue #141 · codellm-devkit/python-sdk · GitHub
Open Graph Title: Index out of bound in case of tree sitter based unused import code · Issue #141 · codellm-devkit/python-sdk
X Title: Index out of bound in case of tree sitter based unused import code · Issue #141 · codellm-devkit/python-sdk
Description: Describe the bug When using the unused import removal code using tree-sitter, getting index out of bound when import statements are very weirdly generated by LLM import org; To Reproduce import org;
Open Graph Description: Describe the bug When using the unused import removal code using tree-sitter, getting index out of bound when import statements are very weirdly generated by LLM import org; To Reproduce import org;
X Description: Describe the bug When using the unused import removal code using tree-sitter, getting index out of bound when import statements are very weirdly generated by LLM import org; To Reproduce import org;
Opengraph URL: https://github.com/codellm-devkit/python-sdk/issues/141
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Index out of bound in case of tree sitter based unused import code","articleBody":"**Describe the bug**\nWhen using the unused import removal code using tree-sitter, getting index out of bound when import statements are very weirdly generated by LLM\n```import org;```\n\n**To Reproduce**\n```\nimport org;\n```\n\n","author":{"url":"https://github.com/rangeetpan","@type":"Person","name":"rangeetpan"},"datePublished":"2025-09-04T20:09:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/141/python-sdk/issues/141"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:4f5b4f5f-c765-ed99-bdcf-e584b7ab837d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E52E:3A1BE:13197C7:1A4D326:698DAF34 |
| html-safe-nonce | 36c22765443c4e049fd54179afc63b5458a446f2720fc18eba85bebca8934479 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTJFOjNBMUJFOjEzMTk3Qzc6MUE0RDMyNjo2OThEQUYzNCIsInZpc2l0b3JfaWQiOiI0ODg0MzQyNjk4OTA1ODA4NjkyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e305ebc2365ed73120bfac6a87f4ef30498398c3f570bd105e69c75ea36a2614 |
| hovercard-subject-tag | issue:3385289915 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codellm-devkit/python-sdk/141/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0b6d028dd0d30cfa87f5c93ce359f8db7ff861e25524cb459ec1d1dd31ecc62b/codellm-devkit/python-sdk/issues/141 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0b6d028dd0d30cfa87f5c93ce359f8db7ff861e25524cb459ec1d1dd31ecc62b/codellm-devkit/python-sdk/issues/141 |
| og:image:alt | Describe the bug When using the unused import removal code using tree-sitter, getting index out of bound when import statements are very weirdly generated by LLM import org; To Reproduce import org; |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rangeetpan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8c7947c0c592efeab6162b9909ad11fa43bff8b0cb5ff43273dc25e41979d43e |
| turbo-cache-control | no-preview |
| go-import | github.com/codellm-devkit/python-sdk git https://github.com/codellm-devkit/python-sdk.git |
| octolytics-dimension-user_id | 197800760 |
| octolytics-dimension-user_login | codellm-devkit |
| octolytics-dimension-repository_id | 826048982 |
| octolytics-dimension-repository_nwo | codellm-devkit/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 826048982 |
| octolytics-dimension-repository_network_root_nwo | codellm-devkit/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b22a9fbf4dea601ec149a9e5362e0558df79b505 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width