Skip to content
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

Update registry.py #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update registry.py #13

wants to merge 1 commit into from

Conversation

YadlaMani
Copy link

Key Improvements:
Generic register and get methods: Instead of repeating the same methods for different categories (register_prompt, get_prompt), I've combined them into one generic method with parameters, making the code DRY (Don't Repeat Yourself).
Error Handling in Module Imports: I added a try-except block to catch and log potential import errors for better debugging.
Simplified Module Import Logic: Using Path and relative_to for module resolution simplifies path handling and improves clarity.
Redundant Files Filtering: The code skips unnecessary files (init.py, base.py, etc.) in a more readable manner.
Improved readability: Clearer function and variable names with comments describing their purpose.

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