diff options
author | Hernan Grecco <hgrecco@gmail.com> | 2023-05-01 10:00:26 -0300 |
---|---|---|
committer | Hernan Grecco <hgrecco@gmail.com> | 2023-05-01 19:12:18 -0300 |
commit | d0442e776bff3053ef900143cd64facf173e1650 (patch) | |
tree | c25053cb5391121c785222320f1a8829db878a37 /pint/babel_names.py | |
parent | a814d1bc4a2e1b0786ca1e56e0f9bf7e363434b4 (diff) | |
download | pint-d0442e776bff3053ef900143cd64facf173e1650.tar.gz |
Typing improvements
While there is still a lot of work to do (mainly in Registry, Quantity, Unit),
this large PR makes several changes all around the code. There has not been
any intended functional change, but certain typing improvements required
code minor code refactoring to streamline input and output types of functions.
An important experimental idea is the PintScalar and PintArray protocols,
and Magnitude type. This is to overcome the lack of a proper numerical
hierarchy in Python.
Diffstat (limited to 'pint/babel_names.py')
-rw-r--r-- | pint/babel_names.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pint/babel_names.py b/pint/babel_names.py index 09fa046..408ef8f 100644 --- a/pint/babel_names.py +++ b/pint/babel_names.py @@ -10,7 +10,7 @@ from __future__ import annotations from .compat import HAS_BABEL -_babel_units = dict( +_babel_units: dict[str, str] = dict( standard_gravity="acceleration-g-force", millibar="pressure-millibar", metric_ton="mass-metric-ton", @@ -141,6 +141,6 @@ _babel_units = dict( if not HAS_BABEL: _babel_units = {} -_babel_systems = dict(mks="metric", imperial="uksystem", US="ussystem") +_babel_systems: dict[str, str] = dict(mks="metric", imperial="uksystem", US="ussystem") -_babel_lengths = ["narrow", "short", "long"] +_babel_lengths: list[str] = ["narrow", "short", "long"] |