-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow registering units externally
- By interpolating `Units.UNIT_SYMBOLS` while registering units, new units can be registered even from outside the `Units` module - `_register_function` now accepts `lazy` which defaults to `false`. It controls updating the `UNIT_MAPPING`. - `@_lazy_register_units` is for internally registering units lazily. The `UNIT_MAPPING` is updated at once at the end.
- Loading branch information
Showing
2 changed files
with
74 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters