Closed arichar6 closed 4 years ago
Public attributes of custom PhysicsModules are shared using a key <class name>_<attribute name>. See this line: https://github.com/NRL-Plasma-Physics-Division/turbopy/blob/165a006ad9ea776e775ef5d823791549b7a53ca5/turbopy/core.py#L434
<class name>_<attribute name>
However, this is using self.__class__, which gives a key like <class 'ModuleName'>, resulting in shared keys like <class 'ModuleName'>_attribute_name.
self.__class__
<class 'ModuleName'>
<class 'ModuleName'>_attribute_name
I think that this should instead use self.__class__.__name__, which should give keys like ModuleName_attribute_name.
self.__class__.__name__
ModuleName_attribute_name
Fixed in #151
Public attributes of custom PhysicsModules are shared using a key
<class name>_<attribute name>
. See this line: https://github.com/NRL-Plasma-Physics-Division/turbopy/blob/165a006ad9ea776e775ef5d823791549b7a53ca5/turbopy/core.py#L434However, this is using
self.__class__
, which gives a key like<class 'ModuleName'>
, resulting in shared keys like<class 'ModuleName'>_attribute_name
.I think that this should instead use
self.__class__.__name__
, which should give keys likeModuleName_attribute_name
.