Create Class: Remove context settings in favour of schema-only non-context #7231
+68
−37
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.
Issue
Fixes #5499, assuming that weird behaviour is caused by context settings. (Which it almost certainly is.)
Description of changes
As per title, I replaced context settings with schema-only (non-context) settings. The only remaining context setting is the variable.
It gets even better. Rules were already an "internal context setting" with the variable as a context. That is, if the user sets the rules for one variable, switches to another, sets some rules, and switches back (s)he will get the rules for the former variable.
After removing context settings, this works as hinting. Load zoo, set some rules for type. Load Iris (rules disappear), set different rules. Go back to zoo and you get the rules back. This hinting is based on variable name.
If this is merged and documentation is updated, close #6961, too.
Includes