Skip to content

Commit

Permalink
Try alternative preprocessor workaround for python3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
softwareengineerprogrammer committed Oct 11, 2024
1 parent 7f1fc0a commit 97c65d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/geophires_x/Units.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def get_unit_registry():
if _UREG is None:
_UREG = pint.get_application_registry()
_UREG.load_definitions(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'GEOPHIRES3_newunits.txt'))
_UREG.preprocessors.append(lambda s: s.replace('%', 'percent'))
_UREG.preprocessors.append(lambda s: s.replace('%%', 'percent'))

return _UREG

Expand Down

0 comments on commit 97c65d5

Please sign in to comment.