Skip to content

ENH: dummy units for introspection and attribute access to create_units dict

username-removed-261087 requested to merge tdaff/ase:units_attributes into master

In certain editors, members of the units module show as missing members since they are dynamically added on import. This merge sets dummy values for all the members so they show up with introspection.

In addition, the units dict from create_units is now a subclass of dict that implements accessing values with attributes so that it can be a drop in replacement for the units module with new_units.eV and new_units['eV'] being equivalent.

Merge request reports