diff --git a/src/bmkg/parsers/parse_area_element.py b/src/bmkg/parsers/parse_area_element.py index 145417c..e1f2654 100644 --- a/src/bmkg/parsers/parse_area_element.py +++ b/src/bmkg/parsers/parse_area_element.py @@ -30,19 +30,19 @@ def parse_area_element(element: Element) -> Area: >>> from defusedxml.ElementTree import fromstring >>> element = fromstring( ... "" - ... 'Aceh Barat' - ... 'Kab. Aceh Barat' + ... ' Aceh Barat' + ... ' Kab. Aceh Barat' ... "" ... ) >>> area = parse_area_element(element) diff --git a/src/bmkg/parsers/parse_datetime_element.py b/src/bmkg/parsers/parse_datetime_element.py index 190c3a4..4e0f48e 100644 --- a/src/bmkg/parsers/parse_datetime_element.py +++ b/src/bmkg/parsers/parse_datetime_element.py @@ -30,24 +30,24 @@ def parse_datetime_element(element: Element) -> Iterator[datetime]: >>> from defusedxml.ElementTree import fromstring >>> element = fromstring( ... '' - ... '' - ... '5' - ... '5.75389725' - ... '9.26' - ... '2.57222222' - ... "" - ... '' - ... '2' - ... '2.3015589' - ... '3.704' - ... '1.028888888' - ... "" - ... '' - ... '0' - ... '0' - ... '0' - ... '0' - ... "" + ... ' ' + ... ' 5' + ... ' 5.75389725' + ... ' 9.26' + ... ' 2.57222222' + ... " " + ... ' ' + ... ' 2' + ... ' 2.3015589' + ... ' 3.704' + ... ' 1.028888888' + ... " " + ... ' ' + ... ' 0' + ... ' 0' + ... ' 0' + ... ' 0' + ... " " ... "" ... ) >>> datetime = parse_datetime_element(element) diff --git a/src/bmkg/parsers/parse_humidity_element.py b/src/bmkg/parsers/parse_humidity_element.py index 6a5dbfe..03ad096 100644 --- a/src/bmkg/parsers/parse_humidity_element.py +++ b/src/bmkg/parsers/parse_humidity_element.py @@ -27,15 +27,15 @@ def parse_humidity_element(element: Element) -> Iterator[Humidity]: >>> from defusedxml.ElementTree import fromstring >>> element = fromstring( ... '' - ... '' - ... '95' - ... "" - ... '' - ... '90' - ... "" - ... '' - ... '95' - ... "" + ... ' ' + ... ' 95' + ... " " + ... ' ' + ... ' 90' + ... " " + ... ' ' + ... ' 95' + ... " " ... "" ... ) >>> humidity = parse_humidity_element(element) diff --git a/src/bmkg/parsers/parse_issue_element.py b/src/bmkg/parsers/parse_issue_element.py index 9cbd30c..eb279f2 100644 --- a/src/bmkg/parsers/parse_issue_element.py +++ b/src/bmkg/parsers/parse_issue_element.py @@ -26,13 +26,13 @@ def parse_issue_element(element: Element) -> datetime: >>> from defusedxml.ElementTree import fromstring >>> element = fromstring( ... "" - ... "20240116032347" - ... "2024" - ... "01" - ... "16" - ... "03" - ... "23" - ... "47" + ... " 20240116032347" + ... " 2024" + ... " 01" + ... " 16" + ... " 03" + ... " 23" + ... " 47" ... "" ... ) >>> issue = parse_issue_element(element) diff --git a/src/bmkg/parsers/parse_temperature_element.py b/src/bmkg/parsers/parse_temperature_element.py index 6133814..1033272 100644 --- a/src/bmkg/parsers/parse_temperature_element.py +++ b/src/bmkg/parsers/parse_temperature_element.py @@ -27,18 +27,18 @@ def parse_temperature_element(element: Element) -> Iterator[Temperature]: >>> from defusedxml.ElementTree import fromstring >>> element = fromstring( ... '' - ... '' - ... '24' - ... '75.2' - ... "" - ... '' - ... '28' - ... '82.4' - ... "" - ... '' - ... '26' - ... '78.8' - ... "" + ... ' ' + ... ' 24' + ... ' 75.2' + ... " " + ... ' ' + ... ' 28' + ... ' 82.4' + ... " " + ... ' ' + ... ' 26' + ... ' 78.8' + ... " " ... "" ... ) >>> temperature = parse_temperature_element(element) diff --git a/src/bmkg/parsers/parse_weather_element.py b/src/bmkg/parsers/parse_weather_element.py index c3cc46f..684399b 100644 --- a/src/bmkg/parsers/parse_weather_element.py +++ b/src/bmkg/parsers/parse_weather_element.py @@ -27,15 +27,15 @@ def parse_weather_element(element: Element) -> Iterator[enums.Weather]: >>> from defusedxml.ElementTree import fromstring >>> element = fromstring( ... '' - ... '' - ... '60' - ... "" - ... '' - ... '60' - ... "" - ... '' - ... '1' - ... "" + ... ' ' + ... ' 60' + ... " " + ... ' ' + ... ' 60' + ... " " + ... ' ' + ... ' 1' + ... " " ... "" ... ) >>> weather = parse_weather_element(element) diff --git a/src/bmkg/parsers/parse_wind_direction_element.py b/src/bmkg/parsers/parse_wind_direction_element.py index 78cfca7..fc4a9e5 100644 --- a/src/bmkg/parsers/parse_wind_direction_element.py +++ b/src/bmkg/parsers/parse_wind_direction_element.py @@ -28,21 +28,21 @@ def parse_wind_direction_element(element: Element) -> Iterator[WindDirection]: >>> from defusedxml.ElementTree import fromstring >>> element = fromstring( ... '' - ... '' - ... '90' - ... 'E' - ... '9000' - ... "" - ... '' - ... '157.5' - ... 'SSE' - ... '15730' - ... "" - ... '' - ... '0' - ... 'VARIABLE' - ... '000' - ... "" + ... ' ' + ... ' 90' + ... ' E' + ... ' 9000' + ... " " + ... ' ' + ... ' 157.5' + ... ' SSE' + ... ' 15730' + ... " " + ... ' ' + ... ' 0' + ... ' VARIABLE' + ... ' 000' + ... " " ... "" ... ) >>> wind_direction = parse_wind_direction_element(element) diff --git a/src/bmkg/parsers/parse_wind_speed_element.py b/src/bmkg/parsers/parse_wind_speed_element.py index 6c26ce0..95481d3 100644 --- a/src/bmkg/parsers/parse_wind_speed_element.py +++ b/src/bmkg/parsers/parse_wind_speed_element.py @@ -27,24 +27,24 @@ def parse_wind_speed_element(element: Element) -> Iterator[WindSpeed]: >>> from defusedxml.ElementTree import fromstring >>> element = fromstring( ... '' - ... '' - ... '5' - ... '5.75389725' - ... '9.26' - ... '2.57222222' - ... "" - ... '' - ... '2' - ... '2.3015589' - ... '3.704' - ... '1.028888888' - ... "" - ... '' - ... '0' - ... '0' - ... '0' - ... '0' - ... "" + ... ' ' + ... ' 5' + ... ' 5.75389725' + ... ' 9.26' + ... ' 2.57222222' + ... " " + ... ' ' + ... ' 2' + ... ' 2.3015589' + ... ' 3.704' + ... ' 1.028888888' + ... " " + ... ' ' + ... ' 0' + ... ' 0' + ... ' 0' + ... ' 0' + ... " " ... "" ... ) >>> wind_speed = parse_wind_speed_element(element) diff --git a/tests/test_parsers/test_parse_weather_forecast_data.py b/tests/test_parsers/test_parse_weather_forecast_data.py index 295f998..6671305 100644 --- a/tests/test_parsers/test_parse_weather_forecast_data.py +++ b/tests/test_parsers/test_parse_weather_forecast_data.py @@ -10,33 +10,33 @@ def test_parse_element_with_invalid_attribute(): ): parse_weather_forecast_data( '' - "" - "" - "20240216023745" - "2024" - "02" - "16" - "02" - "37" - "45" - "" - "" - 'Aceh Barat' - 'Kab. Aceh Barat' - '' - "" - "" - "" + " " + " " + " 20240216023745" + " 2024" + " 02" + " 16" + " 02" + " 37" + " 45" + " " + " " + ' Aceh Barat' + ' Kab. Aceh Barat' + ' ' + " " + " " + " " "" )