-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hi
I am having some issue with variables imported from other modules - impunity seems to fail to find the annotations and treats them as dimensionless. In the attached example, kT_over_q and k, T, and Q are defined with units in t1.py, and used in t2.py. In the definition of D_n2, using variables imported from t1.py, it fails with "Expected unit m^2/s but received incompatible unit m^2/V/s". But re-attaching the annotations using a local variable, does not produce this error (in the similar definition of D_n). Wondering what is going on here. It does not seem to make a difference if I use Annotated or not.
This is with Python 3.12.3
I wonder if there is also a way not to default to dimensionless (once you combine with a dimensioned variable), so that this kind of issue produces a noisy warning.