| 1 | from datetime import datetime, timedelta |
| 2 | from re import Match |
| 3 | from typing import Callable, List, Literal, Optional, Tuple, Union |
| 4 | |
| 5 | from metar.Datatypes import ( |
| 6 | direction, |
| 7 | distance, |
| 8 | precipitation, |
| 9 | pressure, |
| 10 | speed, |
| 11 | temperature, |
| 12 | ) |
| 13 | |
| 14 | def xlate_loc(loc: str) -> str: ... |
| 15 | def _sanitize(code: str) -> str: ... |
| 16 | def _report_match(handler: Callable[[dict], None], match: Match) -> None: ... |
| 17 | def _unparsedGroup(self: "Metar", d: dict) -> None: ... |
| 18 | |
| 19 | class ParserError(Exception): ... |
| 20 | |
| 21 | class Metar: |
| 22 | code: str |
| 23 | type: Literal["METAR", "SPECI"] |
| 24 | correction: Optional[str] |
| 25 | mod: Literal["AUTO", "COR"] |
| 26 | station_id: Optional[str] |
| 27 | time: Optional[datetime] |
| 28 | cycle: Optional[int] |
| 29 | wind_dir: Optional[direction] |
| 30 | wind_speed: Optional[speed] |
| 31 | wind_gust: Optional[speed] |
| 32 | wind_dir_from: Optional[direction] |
| 33 | wind_dir_to: Optional[direction] |
| 34 | vis: Optional[distance] |
| 35 | vis_dir: Optional[direction] |
| 36 | max_vis: Optional[distance] |
| 37 | max_vis_dir: Optional[direction] |
| 38 | temp: Optional[temperature] |
| 39 | dewpt: Optional[temperature] |
| 40 | press: Optional[pressure] |
| 41 | runway: List[list] |
| 42 | weather: List[Tuple[str, str, str, str, str]] |
| 43 | recent: List[Tuple[str, str, str, str, str]] |
| 44 | sky: List[Tuple[str, Optional[distance], str]] |
| 45 | windshear: List[str] |
| 46 | wind_speed_peak: Optional[speed] |
| 47 | wind_dir_peak: Optional[direction] |
| 48 | peak_wind_time: Optional[datetime] |
| 49 | wind_shift_time: Optional[datetime] |
| 50 | max_temp_6hr: Optional[temperature] |
| 51 | min_temp_6hr: Optional[temperature] |
| 52 | max_temp_24hr: Optional[temperature] |
| 53 | min_temp_24hr: Optional[temperature] |
| 54 | press_sea_level: Optional[pressure] |
| 55 | precip_1hr: Optional[precipitation] |
| 56 | precip_3hr: Optional[precipitation] |
| 57 | precip_6hr: Optional[precipitation] |
| 58 | precip_24hr: Optional[precipitation] |
| 59 | snowdepth: Optional[distance] |
| 60 | ice_accretion_1hr: Optional[precipitation] |
| 61 | ice_accretion_3hr: Optional[precipitation] |
| 62 | ice_accretion_6hr: Optional[precipitation] |
| 63 | _trend: bool |
| 64 | _trend_groups: List[str] |
| 65 | _remarks: List[str] |
| 66 | _unparsed_groups: List[str] |
| 67 | _unparsed_remarks: List[str] |
| 68 | _now: datetime |
| 69 | month: int |
| 70 | year: int |
| 71 | |
| 72 | def __init__( |
| 73 | self, |
| 74 | metarcode: str, |
| 75 | month: Optional[int] = ..., |
| 76 | year: Optional[int] = ..., |
| 77 | strict: bool = ..., |
| 78 | ): ... |
| 79 | @property |
| 80 | def decode_completed(self) -> bool: ... |
| 81 | def _do_trend_handlers(self, code: str) -> str: ... |
| 82 | def __str__(self) -> str: ... |
| 83 | def _handleType(self, d: dict) -> None: ... |
| 84 | def _handleCorrection(self, d: dict) -> None: ... |
| 85 | def _handleStation(self, d: dict) -> None: ... |
| 86 | def _handleModifier(self, d: dict) -> None: ... |
| 87 | def _handleTime(self, d: dict) -> None: ... |
| 88 | def _handleWind(self, d: dict) -> None: ... |
| 89 | def _handleVisibility(self, d: dict) -> None: ... |
| 90 | def _handleRunway(self, d: dict) -> None: ... |
| 91 | def _handleWeather(self, d: dict) -> None: ... |
| 92 | def _handleSky(self, d: dict) -> None: ... |
| 93 | def _handleTemp(self, d: dict) -> None: ... |
| 94 | def _handlePressure(self, d: dict) -> None: ... |
| 95 | def _handleRecent(self, d: dict) -> None: ... |
| 96 | def _handleWindShear(self, d: dict) -> None: ... |
| 97 | def _handleColor(self, d: dict) -> None: ... |
| 98 | def _handleRunwayState(self, d: dict) -> None: ... |
| 99 | def _handleTrend(self, d: dict) -> None: ... |
| 100 | def _startRemarks(self, d: dict) -> None: ... |
| 101 | def _handleSealvlPressRemark(self, d: dict) -> None: ... |
| 102 | def _handlePrecip24hrRemark(self, d: dict) -> None: ... |
| 103 | def _handlePrecip1hrRemark(self, d: dict) -> None: ... |
| 104 | def _handleTemp1hrRemark(self, d: dict) -> None: ... |
| 105 | def _handleTemp6hrRemark(self, d: dict) -> None: ... |
| 106 | def _handleTemp24hrRemark(self, d: dict) -> None: ... |
| 107 | def _handlePress3hrRemark(self, d: dict) -> None: ... |
| 108 | def _handlePeakWindRemark(self, d: dict) -> None: ... |
| 109 | def _handleWindShiftRemark(self, d: dict) -> None: ... |
| 110 | def _handleLightningRemark(self, d: dict) -> None: ... |
| 111 | def _handleTSLocRemark(self, d: dict) -> None: ... |
| 112 | def _handleAutoRemark(self, d: dict) -> None: ... |
| 113 | def _handleSnowDepthRemark(self, d: dict) -> None: ... |
| 114 | def _handleIceAccretionRemark(self, d: dict) -> None: ... |
| 115 | def _unparsedRemark(self, d: dict) -> None: ... |
| 116 | def string(self) -> str: ... |
| 117 | def report_type(self) -> str: ... |
| 118 | def wind( |
| 119 | self, |
| 120 | units: Literal["KT", "MPS", "KMH", "MPH", "kt", "mps", "kmh", "mph"] = ..., |
| 121 | ) -> str: ... |
| 122 | def peak_wind( |
| 123 | self, |
| 124 | units: Literal["KT", "MPS", "KMH", "MPH", "kt", "mps", "kmh", "mph"] = ..., |
| 125 | ) -> str: ... |
| 126 | def wind_shift( |
| 127 | self, |
| 128 | units: Literal["KT", "MPS", "KMH", "MPH", "kt", "mps", "kmh", "mph"] = ..., |
| 129 | ) -> str: ... |
| 130 | def visibility( |
| 131 | self, |
| 132 | units: Optional[ |
| 133 | Literal[ |
| 134 | "SM", "MI", "M", "KM", "FT", "IN", "sm", "mi", "m", "km", "ft", "in" |
| 135 | ] |
| 136 | ] = ..., |
| 137 | ) -> str: ... |
| 138 | def runway_visual_range( |
| 139 | self, |
| 140 | units: Optional[ |
| 141 | Literal[ |
| 142 | "SM", "MI", "M", "KM", "FT", "IN", "sm", "mi", "m", "km", "ft", "in" |
| 143 | ] |
| 144 | ] = ..., |
| 145 | ) -> str: ... |
| 146 | def present_weather(self) -> str: ... |
| 147 | def recent_weather(self) -> str: ... |
| 148 | def _weather(self, weather: list) -> str: ... |
| 149 | def sky_conditions(self, sep: str = "; ") -> str: ... |
| 150 | def trend(self) -> str: ... |
| 151 | def remarks(self, sep: str = "; ") -> str: ... |