Skip to content

Commit

Permalink
🎨 style(quantity): rename modules
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Starkman <[email protected]>
  • Loading branch information
nstarman committed Dec 23, 2024
1 parent 48519e6 commit f22019d
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/unxt/_src/quantity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
from .api import is_unit_convertible, uconvert, ustrip
from .base import AbstractQuantity
from .base_parametric import AbstractParametricQuantity
from .core import Quantity
from .fast import UncheckedQuantity
from .quantity import Quantity
from .unchecked import UncheckedQuantity
4 changes: 2 additions & 2 deletions src/unxt/_src/quantity/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

from .api import ustrip
from .base import AbstractQuantity
from .core import Quantity
from .fast import UncheckedQuantity
from .quantity import Quantity
from .unchecked import UncheckedQuantity
from unxt._src.dimensions import AbstractDimension
from unxt._src.units.api import AbstractUnits

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/unxt/_src/quantity/register_dispatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from .api import ustrip
from .base import AbstractQuantity
from .core import Quantity
from .quantity import Quantity

# -----------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/unxt/_src/quantity/register_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
from .api import is_unit_convertible, uconvert, ustrip
from .base import AbstractQuantity
from .base_parametric import AbstractParametricQuantity
from .core import Quantity
from .quantity import Quantity
from unxt._src.units import unit, unit_of
from unxt._src.utils import promote_dtypes_if_needed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __class_getitem__(
>>> from unxt.quantity import UncheckedQuantity
>>> UncheckedQuantity["length"]
<class 'unxt._src.quantity.fast.UncheckedQuantity'>
<class 'unxt...quantity...UncheckedQuantity'>
"""
return cls
13 changes: 9 additions & 4 deletions src/unxt/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@
from ._src.quantity.api import is_unit_convertible, uconvert, ustrip
from ._src.quantity.base import AbstractQuantity
from ._src.quantity.base_parametric import AbstractParametricQuantity
from ._src.quantity.core import Quantity
from ._src.quantity.fast import UncheckedQuantity
from ._src.quantity.quantity import Quantity
from ._src.quantity.unchecked import UncheckedQuantity

# isort: split
# Register dispatches and conversions
from ._src.quantity import compat, functional, register_dispatches, register_primitives
from ._src.quantity import (
compat,
register_api,
register_dispatches,
register_primitives,
)

__all__: list[str] = [
# Core
Expand All @@ -39,4 +44,4 @@


# Clean up namespace
del compat, functional, register_dispatches, register_primitives
del compat, register_api, register_dispatches, register_primitives

0 comments on commit f22019d

Please sign in to comment.