Skip to content

Commit

Permalink
fix: registering self promotion
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Jun 25, 2024
1 parent 8b99fba commit 438b2c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/unxt/_quantity/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
)
from jax.numpy import dtype as DType # noqa: N812
from jaxtyping import Array, ArrayLike, Shaped
from plum import add_promotion_rule
from quax import ArrayValue
from typing_extensions import Self

Expand Down Expand Up @@ -192,6 +191,7 @@ def constructor(
def constructor(
cls: "type[AbstractQuantity]",
value: ArrayLike | ArrayLikeSequence,
/,
*,
unit: Any,
dtype: Any = None,
Expand Down Expand Up @@ -544,7 +544,7 @@ def constructor(

@AbstractQuantity.constructor._f.register # type: ignore[no-redef] # noqa: SLF001
def constructor(
cls: type[AbstractQuantity], value: AstropyQuantity, *, dtype: Any = None
cls: type[AbstractQuantity], value: AstropyQuantity, /, *, dtype: Any = None
) -> AbstractQuantity:
"""Construct a `Quantity` from another `Quantity`.
Expand Down Expand Up @@ -572,7 +572,7 @@ def constructor(
# -----------------------------------------------
# Promotion rules

add_promotion_rule(AbstractQuantity, AbstractQuantity, AbstractQuantity)
# add_promotion_rule(AbstractQuantity, AbstractQuantity, AbstractQuantity)


# ===============================================================
Expand Down

0 comments on commit 438b2c1

Please sign in to comment.