-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add Config handling for language modules #74
Conversation
Fix typo in TranslationFactory inig Add default config to base Language classes
Codecov Report
@@ Coverage Diff @@
## dev #74 +/- ##
=====================================
Coverage ? 0.00%
=====================================
Files ? 40
Lines ? 2661
Branches ? 0
=====================================
Hits ? 0
Misses ? 2661
Partials ? 0 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
couple nitpicks that can be ignored, this looks good and much cleaner! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above for all template classes, configs should only be loaded in factory classes and passed as arguments, the templates should stay "pure" and fully independent objects for usage outside mycroft context
""" | ||
config = config or Configuration() | ||
lang = config.get('lang') or Configuration().get('lang') | ||
config = (config.get('intentBox', {}).get(section) or config.get(section) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be behind some other check? will merge for now but we should revisit since this allows any config to live under intentBox section and we likely want to throw an error in that case
Update Language factory to pass module config
Fix typo in TranslationFactory inig
Add default config to base Language classes