Conversation
09f4494 to
16d084f
Compare
16d084f to
ee6a2e2
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 16, 2021
Predefined error messages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Error Message to Required Variables
This MR allows the module-creator to give the user more information about a set of required variables (if they are missing).
Description
Reason for this change is that miniflask allows module-groups to be entangled, in a way that require a module of one group to be loaded in order for another module to be working.
For instance, imagine a module to be a template or base-class for other instanciations that set the base variables according to their specialized features.
This MR gives the possibility to remind the user in such cases that there is such an dependency and the user requires to choose a specialization.
Previously:
The user would get a list of all required parameters, possibly not remembering or knowing about the inter-connection of some modules.
New Behavior:
Additionally, the user gets a message to describe the unmet dependencies.
Things done in this MR
mf.register_defaults(..., missing_argument_message=None)Check all before creating this PR:
Example Usage