Debian Codegraph @

pint/facets/numpy/registry.py

raw
1 """
2 pint.facets.numpy.registry
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~
4
5 :copyright: 2022 by Pint Authors, see AUTHORS for more details.
6 :license: BSD, see LICENSE for more details.
7 """
8
9 from __future__ import annotations
10
11 from typing import Generic
12
13 from ...compat import TypeAlias
14 from ..plain import GenericPlainRegistry, QuantityT, UnitT
15 from .quantity import NumpyQuantity
16 from .unit import NumpyUnit
17
18
19 class GenericNumpyRegistry(
20 Generic[QuantityT, UnitT], GenericPlainRegistry[QuantityT, UnitT]
21 ):
22 pass
23
24
25 class NumpyRegistry(GenericPlainRegistry[NumpyQuantity, NumpyUnit]):
26 Quantity: TypeAlias = NumpyQuantity
27 Unit: TypeAlias = NumpyUnit