Skip to content

ConfigBlock: change groupName, noneAction and duplicateAction

The groupName variable was made an option from all blocks.

So that it is possible to set options for any block from an arbitrary point in the code, an groupName option was added that tags a block so that it (and any other blocks with the same groupName) can be referenced at any time.

Removed code used to potentially throw an error if an option was set more than once. This can be the responsibility of the user.

The behavior of noneAction was changed. noneAction is set when adding a variable rather than when setting a value for an option. The idea is that the author of the class would know whether it is okay for an option to be set to None and what they want to happen if that happens. It would be the users responsibility to make sure they pass the correct values in their code. By default, if an option is set to None, it is ignored. This decision was made based on the behavior in the many make functions.

Note:

  • Removing groupName will break custom blocks not part of the central code. To fix this, remove groupName from __init__.
  • The make functions typically set ignoreAction='ignore'. Since this was removed from setOptionValue, this will need to be removed from any custom make functions.
Edited by Joseph Earl Lambert

Merge request reports

Loading