avwx.current.airep

 1# """
 2# """
 3
 4# # pylint: skip-file
 5# # mypy: ignore-errors
 6
 7# # stdlib
 8# from datetime import date
 9# from typing import List
10
11# # module
12# from avwx.current.base import Reports
13# from avwx.parsing import sanitization
14# from avwx.structs import AirepData
15
16
17# def parse(report: str, issued: date = None) -> AirepData:
18#     """"""
19#     if not report:
20#         return None
21#     clean = sanitization.sanitize_report_string(report)
22#     wxdata = sanitization.sanitize_report_list(clean.split())
23#     wxresp = {"raw": report, "sanitized": " ".join(wxdata)}
24#     print(wxdata)
25#     print(wxresp)
26#     return None
27
28
29# class Aireps(Reports):
30#     """Class to handle aircraft report data"""
31
32#     data: List[AirepData] = None
33
34#     @staticmethod
35#     def _report_filter(reports: List[str]) -> List[str]:
36#         """Removes PIREPs before updating raw_reports"""
37#         return [r for r in reports if r.startswith("ARP")]
38
39#     async def _post_update(self):
40#         self.data = []
41#         for report in self.raw:
42#             parse(report, self.issued)
43
44#     def _post_parse(self):
45#         self.data = []
46#         for report in self.raw:
47#             parse(report, self.issued)