1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
|
from typing import Any, List, Optional, Union, overload
from quantities import Quantity
from quantities.dimensionality import Dimensionality
class UnitQuantity(Quantity):
_primary_order: int
_secondary_order: int
_reference_quantity: Optional[Quantity]
def __new__(
cls, name: str, definition: Optional[Union[Quantity, float, int]] = ..., symbol: Optional[str] = ...,
u_symbol: Optional[str] = ...,
aliases: List[str] = ..., doc=...
) -> UnitQuantity:
...
def __init__(
self, name: str, definition: Optional[Union[Quantity, float, int]] = ..., symbol: Optional[str] = ...,
u_symbol: Optional[str] = ...,
aliases: List[str] = ..., doc=...
) -> None:
...
def __hash__(self) -> int: # type: ignore[override]
...
@property
def _reference(self) -> UnitQuantity:
...
@property
def _dimensionality(self) -> Dimensionality:
...
@property
def name(self) -> str:
...
@property
def symbol(self) -> str:
...
@property
def u_symbol(self) -> str:
...
@property
def units(self) -> UnitQuantity:
...
def __repr__(self) -> str:
...
def __str__(self) -> str:
...
def __add__(self, other) -> Quantity:
...
def __radd__(self, other) -> Quantity:
...
def __sub__(self, other) -> Any:
...
def __rsub__(self, other) -> Any:
...
def __mod__(self, other) -> Quantity:
...
def __rmod__(self, other) -> Quantity:
...
def __mul__(self, other) -> Quantity:
...
def __rmul__(self, other) -> Quantity:
...
def __truediv__(self, other) -> Any:
...
def __rtruediv__(self, other) -> Any:
...
def __pow__(self, other) -> Quantity:
...
def __rpow__(self, other) -> Quantity:
...
class IrreducibleUnit(UnitQuantity):
_default_unit: Optional[Quantity]
@property
def simplified(self) -> Quantity:
...
@classmethod
def get_default_unit(cls) -> Optional[Quantity]:
...
@classmethod
def set_default_unit(cls, unit: Union[str, Quantity]):
...
class UnitMass(IrreducibleUnit):
...
class UnitLength(IrreducibleUnit):
...
class UnitTime(IrreducibleUnit):
...
class UnitCurrent(IrreducibleUnit):
...
class UnitLuminousIntensity(IrreducibleUnit):
...
class UnitSubstance(IrreducibleUnit):
...
class UnitTemperature(IrreducibleUnit):
...
class UnitInformation(IrreducibleUnit):
...
class UnitCurrency(IrreducibleUnit):
...
class CompoundUnit(UnitQuantity):
...
class Dimensionless(UnitQuantity):
@property
def _dimensionality(self) -> Dimensionality:
...
dimensionless: Dimensionless
class UnitConstant(UnitQuantity):
...
def set_default_units(system: Optional[str] = ...,
currency: Optional[Union[str, UnitCurrency]] = ...,
current: Optional[Union[str, UnitCurrent]] = ...,
information: Optional[Union[str, UnitInformation]] = ...,
length: Optional[Union[str, UnitLength]] = ...,
luminous_intensity: Optional[Union[str, UnitLuminousIntensity]] = ...,
mass: Optional[Union[str, UnitMass]] = ...,
substance: Optional[Union[str, UnitSubstance]] = ...,
temperature: Optional[Union[str, UnitTemperature]] = ...,
time: Optional[Union[str, UnitTime]] = ...):
...
|