Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mypy error: ureg.m annotation is expected to be Quantity instead of Unit #1946

Open
Luna137 opened this issue Mar 4, 2024 · 0 comments · May be fixed by #1948
Open

mypy error: ureg.m annotation is expected to be Quantity instead of Unit #1946

Luna137 opened this issue Mar 4, 2024 · 0 comments · May be fixed by #1948

Comments

@Luna137
Copy link

Luna137 commented Mar 4, 2024

With the newest version of pint, running mypy on the following script

import pint

ureg = pint.UnitRegistry()
unit_of_length: pint.Unit = ureg.m

returns the following error:

Incompatible types in assignment (expression has type "Quantity", variable has type "Unit")  [assignment]
@Luna137 Luna137 linked a pull request Mar 4, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant