Skip to content

Conversation

@zschaller27
Copy link
Contributor

@zschaller27 zschaller27 commented Sep 17, 2025

  • Closes Typing in 0.26 #1770
  • Executed pre-commit run --all-files or pixi run lint --all-files with no errors
  • The change is fully covered by automated unit tests
  • Documented in docs/ as appropriate
  • Added an entry to the CHANGES file

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 20, 2025

CodSpeed Performance Report

Merging #2231 will not alter performance

Comparing zschaller27:master (71233b7) with master (5e5104d)

Summary

✅ 448 untouched

@andrewgsavage
Copy link
Collaborator

Any idea why this doesn't work

ureg = UnitRegistry()
length = ureg.Quantity[int]

TypeError: <class 'pint.Quantity'> is not a generic class

@zschaller27
Copy link
Contributor Author

Any idea why this doesn't work

ureg = UnitRegistry()
length = ureg.Quantity[int]

TypeError: <class 'pint.Quantity'> is not a generic class

I'd forgotten to change the UnitRegistry class signature to make use of the facets.MagnitudeT typevar. I've pushed that small change so this should work now.

@andrewgsavage
Copy link
Collaborator

nice one, thanks!

@andrewgsavage andrewgsavage merged commit 7101803 into hgrecco:master Oct 6, 2025
55 checks passed
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 this pull request may close these issues.

Typing in 0.26

2 participants