| 1 | from typing import Literal, Optional, Union |
| 2 | |
| 3 | GreaterOrLess = Literal[">", "<"] |
| 4 | Value = Union[str, float] |
| 5 | |
| 6 | TemperatureUnit = Literal["F", "C", "K", "f", "c", "k"] |
| 7 | |
| 8 | class temperature: |
| 9 | _units: TemperatureUnit |
| 10 | _value: float |
| 11 | |
| 12 | def __init__(self, value: Value, units: TemperatureUnit = "C") -> None: ... |
| 13 | def __str__(self) -> str: ... |
| 14 | def value(self, units: Optional[TemperatureUnit] = None) -> float: ... |
| 15 | def string(self, units: Optional[TemperatureUnit] = None) -> str: ... |
| 16 | |
| 17 | PressureUnit = Literal["MB", "HPA", "IN", "mb", "hPa", "in"] |
| 18 | |
| 19 | class pressure: |
| 20 | _units: PressureUnit |
| 21 | _value: float |
| 22 | |
| 23 | def __init__(self, value: Value, units: PressureUnit = "HPA") -> None: ... |
| 24 | def __str__(self) -> str: ... |
| 25 | def value(self, units: Optional[PressureUnit] = None) -> float: ... |
| 26 | def string(self, units: Optional[PressureUnit] = None) -> str: ... |
| 27 | |
| 28 | SpeedUnit = Literal["KT", "MPS", "KMH", "MPH", "kt", "mps", "kmh", "mph"] |
| 29 | |
| 30 | class speed: |
| 31 | _units: SpeedUnit |
| 32 | _value: float |
| 33 | _gtlt: GreaterOrLess |
| 34 | |
| 35 | def __init__( |
| 36 | self, |
| 37 | value: Value, |
| 38 | units: Optional[SpeedUnit] = None, |
| 39 | gtlt: Optional[GreaterOrLess] = None, |
| 40 | ) -> None: ... |
| 41 | def __str__(self) -> str: ... |
| 42 | def value(self, units: Optional[SpeedUnit] = None) -> float: ... |
| 43 | def string(self, units: Optional[SpeedUnit] = None) -> str: ... |
| 44 | |
| 45 | DistanceUnit = Literal[ |
| 46 | "SM", "MI", "M", "KM", "FT", "IN", "sm", "mi", "m", "km", "ft", "in" |
| 47 | ] |
| 48 | |
| 49 | class distance: |
| 50 | _units: DistanceUnit |
| 51 | _value: float |
| 52 | _gtlt: GreaterOrLess |
| 53 | _num: Optional[int] |
| 54 | _den: Optional[int] |
| 55 | |
| 56 | def __init__( |
| 57 | self, |
| 58 | value: Value, |
| 59 | units: Optional[DistanceUnit] = None, |
| 60 | gtlt: Optional[GreaterOrLess] = None, |
| 61 | ) -> None: ... |
| 62 | def __str__(self) -> str: ... |
| 63 | def value(self, units: Optional[DistanceUnit] = None) -> float: ... |
| 64 | def string(self, units: Optional[DistanceUnit] = None) -> str: ... |
| 65 | |
| 66 | CompassDirection = Literal[ |
| 67 | "N", |
| 68 | "NNE", |
| 69 | "NE", |
| 70 | "ENE", |
| 71 | "E", |
| 72 | "ESE", |
| 73 | "SE", |
| 74 | "SSE", |
| 75 | "S", |
| 76 | "SSW", |
| 77 | "SW", |
| 78 | "WSW", |
| 79 | "W", |
| 80 | "WNW", |
| 81 | "NW", |
| 82 | "NNW", |
| 83 | ] |
| 84 | |
| 85 | class direction: |
| 86 | _compass: Optional[CompassDirection] |
| 87 | _degrees: float |
| 88 | |
| 89 | def __init__( |
| 90 | self, |
| 91 | d: Union[CompassDirection, Value], |
| 92 | ): ... |
| 93 | def __str__(self) -> str: ... |
| 94 | def value(self) -> float: ... |
| 95 | def string(self) -> str: ... |
| 96 | def compass(self) -> CompassDirection: ... |
| 97 | |
| 98 | PrecipitationUnit = Literal["IN", "CM", "in", "cm"] |
| 99 | |
| 100 | class precipitation(object): |
| 101 | _units: PrecipitationUnit |
| 102 | _value: float |
| 103 | _gtlt: GreaterOrLess |
| 104 | _istrace: bool |
| 105 | |
| 106 | def __init__( |
| 107 | self, |
| 108 | value: Value, |
| 109 | units: Optional[PrecipitationUnit] = None, |
| 110 | gtlt: Optional[GreaterOrLess] = None, |
| 111 | ) -> None: ... |
| 112 | def __str__(self) -> str: ... |
| 113 | def value(self, units: Optional[PrecipitationUnit] = None) -> float: ... |
| 114 | def string(self, units: Optional[PrecipitationUnit] = None) -> str: ... |
| 115 | def istrace(self) -> bool: ... |
| 116 | |
| 117 | class position: |
| 118 | latitude: Optional[float] |
| 119 | longitude: Optional[float] |
| 120 | |
| 121 | def __init__( |
| 122 | self, latitude: Optional[float] = None, longitude: Optional[float] = None |
| 123 | ): ... |
| 124 | def __str__(self) -> str: ... |
| 125 | def getdirection(self, position2: "position") -> direction: ... |