Remove unused Python code#347
Conversation
Remove 8 dead code symbols verified by vulture and manual cross-referencing against entry points, __all__ exports, and TYPE_CHECKING blocks: - FileAccessError (exceptions.py): unused exception class - raise_expired_token_error (client.py): unused function - should_end_lease (hooks.py): unused method - remove_logger_source (session.py): unused method - is_token_expired (oidc.py): unused function - FileWriteError (http driver.py): unused exception class - StorageObjectError (iscsi driver.py): unused exception class - is_subpath (tftp server.py): unused function Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This method was incorrectly removed as dead code. It belongs to the public API of an actively-used exception class alongside should_shutdown_exporter. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for jumpstarter-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (6)
📝 WalkthroughWalkthroughThis pull request removes unused or deprecated utility functions and exception classes across multiple packages: token expiration helpers ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
FileAccessErrorexception class (jumpstarter core)raise_expired_token_errorfunction (client config)remove_logger_sourcemethod (exporter session)is_token_expiredfunction (CLI common)FileWriteErrorexception class (HTTP driver)StorageObjectErrorexception class (iSCSI driver)is_subpathfunction (TFTP server) - filed TFTP server missing path traversal protection #346 for missing path traversal checkshould_end_leaseonHookExecutionError(incorrectly identified as dead)Test plan
make lintpasses with zero violationsmake testpasses (18 suites pass, 1 pre-existing opendal failure)🤖 Generated with Claude Code