1

I am trying to use type hints throughout my code. For metpy quantities, I find this to be quite hard as they inherit from pint.

If I check the type of the quantities I am using I find out that they are pint.quantity.build_quantity_class..Quantity But I don't want to have this type written in a type hint.

Is there a shorter/clearer way and best practice for type hints of metpy quantities (and other similar complex objects)?

1 Answers1

0

The MetPy project itself has not done much with type hints, but you might want to take a look at the Pull Request that added some typing information to Pint itself.

DopplerShift
  • 5,472
  • 1
  • 21
  • 20