Not sure if this belongs here or on openff-models, but here's a MCVE:
# file named example.py
from openff.models.types import FloatQuantity
import openff.units # type: ignore
print(f"{openff.units.__version__=}")
models_quantity: FloatQuantity["kelvin"]
Then, with openff-units 0.2.0 (and openff-models at current release, 0.0.5):
$ python example.py && mypy example.py
openff.units.__version__='0.2.0'
Success: no issues found in 1 source file
With openff-units 0.2.1:
$ python example.py && mypy example.py
openff.units.__version__='0.2.1'
example.py:5: error: Variable "openff.models.types.FloatQuantity" is not valid as a type [valid-type]
example.py:5: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
example.py:5: error: Name "kelvin" is not defined [name-defined]
Found 2 errors in 1 file (checked 1 source file)
see also OpenFreeEnergy/openfe#461
Not sure if this belongs here or on openff-models, but here's a MCVE:
Then, with openff-units 0.2.0 (and openff-models at current release, 0.0.5):
With openff-units 0.2.1:
see also OpenFreeEnergy/openfe#461