from typing import Any, Callable, Union, TypeVar, ClassVar

from .dimensions import Dimensions

_Q = TypeVar("_Q")

class SIUnit:
    scale: float
    dimensions: Dimensions

    factory = ClassVar[Callable[[Any, "SIUnit"], _Q]]
    @staticmethod
    def Unit(
        scale: float = 1.0,
        kg: float = 0,
        m: float = 0,
        s: float = 0,
        k: float = 0,
        a: float = 0,
        mol: float = 0,
        cd: float = 0,
    ) -> SIUnit: ...
    def __init__(self, scale: float, dimensions: Dimensions) -> None: ...
    def base_units(self) -> SIUnit: ...
    def compatible(self, units: SIUnit) -> bool: ...
    def __mul__(self, rhs: Any) -> Union[SIUnit, _Q]: ...
    def __rmul__(self, lhs: Any) -> Union[SIUnit, _Q]: ...
    def __truediv__(self, rhs: Any) -> Union[SIUnit, _Q]: ...
    def __rtruediv__(self, lhs: Any) -> Union[SIUnit, _Q]: ...
    def __pow__(self, rhs: Any) -> SIUnit: ...
    def __invert__(self) -> SIUnit: ...
    def __eq__(self, other: Any) -> bool: ...
    def __ne__(self, other: Any) -> bool: ...
    def __hash__(self) -> int: ...
    def __str__(self) -> str: ...
    def __repr__(self) -> str: ...
