Skip to content

Commit

Permalink
refactor: fix comment typos again (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentame authored Oct 27, 2024
1 parent 03fa59d commit 0b35302
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ The client allows:
* Fetch daily or hourly weather forecast.
* Fetch rain forecast within the next hour if available.
* Fetch the weather alerts or phenomenons for each French department or Andorre.
Two bulletin are availabe: one basic and an other advanced with the timelaps evolution
Two bulletin are available: one basic and an other advanced with the timelaps evolution
for the next 24 hours (example `here <https://vigilance.meteofrance.fr/fr/gers>`_).

This package have been developed to be used with `Home-Assistant <https://home-assistant.io/>`_
Expand Down
4 changes: 2 additions & 2 deletions src/meteofrance_api/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def get_phenomenon_name_from_indice(


def is_coastal_department(department_number: str) -> bool:
"""Identify when a second bulletin is availabe for coastal risks (Helper).
"""Identify when a second bulletin is available for coastal risks (Helper).
Args:
department_number: Department number on 2 characters
Expand All @@ -73,7 +73,7 @@ def is_coastal_department(department_number: str) -> bool:
def is_valid_warning_department(department_number: str) -> bool:
"""Identify if there is a weather alert bulletin for this department (Helper).
Weather alert buletins are available only for metropolitan France and Andorre.
Weather alert bulletins are available only for metropolitan France and Andorre.
Args:
department_number: Department number on 2 characters.
Expand Down
4 changes: 2 additions & 2 deletions src/meteofrance_api/model/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class WarningDictionaryData(TypedDict):


class WarningDictionary:
"""A class to represent and manipulate the Meteo France meteorological dictionary data.
"""A class to represent and manipulate the Météo-France meteorological dictionary data.
Methods:
get_phenomenon_name_by_id(phenomenon_id: int): Returns the name of the
Expand All @@ -58,7 +58,7 @@ def __init__(self, raw_data: WarningDictionaryData) -> None:
"""Initializes the WarningDictionary with raw dictionary data.
Args:
raw_data: A dictionary representing the JSON response from the Meteo France API.
raw_data: A dictionary representing the JSON response from the Météo-France API.
"""
self.raw_data = raw_data

Expand Down
2 changes: 1 addition & 1 deletion src/meteofrance_api/model/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def forecast(self) -> List[Dict[str, Any]]:

@property
def probability_forecast(self) -> List[Dict[str, Any]]:
"""Return the wheather event forecast."""
"""Return the weather event forecast."""
return self.raw_data.get("probability_forecast", [])

@property
Expand Down
2 changes: 1 addition & 1 deletion src/meteofrance_api/model/picture_of_the_day.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class PictureOfTheDay:
image_url: A string corresponding to the picture of the day URL.
image_hd_url: A string corresponding to the URL for the HD version of the
picture of the day.
descritpion: A string with the description of the picture of the day.
description: A string with the description of the picture of the day.
"""

def __init__(self, raw_data: PictureOfTheDayData) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/meteofrance_api/model/place.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Place:
country: A string corresponding to the country code of the place.
admin: A string with the name of the administrative area ('Département' for
France and Region for other countries).
admin2: A string correponding to an administrative code ( 'Département' number
admin2: A string corresponding to an administrative code ('Département' number
for France)
postCode: A string corresponding to the ZIP code of location.
"""
Expand Down
10 changes: 5 additions & 5 deletions src/meteofrance_api/model/warning.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Weather alert buletin Python model for the Météo-France REST API.
"""Weather alert bulletin Python model for the Météo-France REST API.
For getting weather alerts in France Metropole and Andorre.
For getting weather alerts in metropolitan France and Andorre.
"""

from typing import Any
Expand Down Expand Up @@ -66,7 +66,7 @@ class CurrentPhenomenons:
Attributes:
update_time: A timestamp (as integer) corresponding to the latest update of the
pheomenoms.
phenomenons.
end_validity_time: A timestamp (as integer) corresponding to expiration date of
the phenomenons.
domain_id: A string corresponding do the domain ID of the bulletin. Value is
Expand Down Expand Up @@ -110,7 +110,7 @@ def merge_with_coastal_phenomenons(
) -> None:
"""Merge the classical phenomenons bulleting with the coastal one.
Extend the phenomenones_max_colors property with the content of the coastal
Extend the phenomenons_max_colors property with the content of the coastal
weather alert bulletin.
Args:
Expand Down Expand Up @@ -145,7 +145,7 @@ class Full:
Attributes:
update_time: A timestamp (as integer) corresponding to the latest update of the
pheomenoms.
phenomenons.
end_validity_time: A timestamp (as integer) corresponding to expiration date of
the phenomenons.
domain_id: A string corresponding do the domain ID of the bulletin. Value is
Expand Down
4 changes: 2 additions & 2 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_get_warning_text_status_from_indice_color_en() -> None:
],
)
def test_is_coastal_department(dep: str, res: bool) -> None:
"""Test the helper checking if an additional coastal departement bulletin exist."""
"""Test the helper checking if an additional coastal department bulletin exist."""
assert is_coastal_department(dep) == res


Expand All @@ -54,7 +54,7 @@ def test_is_coastal_department(dep: str, res: bool) -> None:
],
)
def test_is_valid_warning_department(dep: str, res: bool) -> None:
"""Test the helper checking if departent has a weather alert bulletin."""
"""Test the helper checking if department has a weather alert bulletin."""
assert is_valid_warning_department(dep) == res


Expand Down
2 changes: 1 addition & 1 deletion tests/test_place.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def test_places() -> None:
"""Test for simple seach of Place."""
"""Test for simple search of Place."""
client = MeteoFranceClient()

list_places = client.search_places("montreal")
Expand Down

0 comments on commit 0b35302

Please sign in to comment.