-
Notifications
You must be signed in to change notification settings - Fork 4
Replace exit(1) with ModificationNotSupportedError exception in dianncfg.py #61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
Co-authored-by: ypriverol <52113+ypriverol@users.noreply.github.com>
Co-authored-by: ypriverol <52113+ypriverol@users.noreply.github.com>
Co-authored-by: ypriverol <52113+ypriverol@users.noreply.github.com>
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
User description
Addresses code review feedback from #59: using
exit(1)in library code terminates the entire Python process, preventing callers from handling errors appropriately.Changes
ModificationNotSupportedErrorexception classexit(1)calls with raising the exception:diann_config.cfgto.gitignore(test artifact)Example
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
PR Type
Bug fix, Enhancement
Description
Replace three
exit(1)calls withModificationNotSupportedErrorexceptionAdd custom exception class for unsupported modifications
Fix grammar in error message ("support" → "supports")
Enable proper error handling instead of process termination
Diagram Walkthrough
File Walkthrough
dianncfg.py
Replace exit calls with custom exceptionquantmsutils/diann/dianncfg.py
ModificationNotSupportedErrorexception class for unsupportedmodifications
exit(1)calls with raising the new exception inget_mod()functionlogging and raising