Skip to content

Commit

Permalink
style: rename chances_of_remdry (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
null8626 committed Feb 14, 2024
1 parent 73baa6f commit 2dd56f0
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions python_weather/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
SOFTWARE.
"""

import warnings
from typing import Iterable, Optional, Tuple
from datetime import datetime, date, time
from enum import auto
Expand Down Expand Up @@ -239,11 +240,18 @@ def chances_of_rain(self) -> int:
return int(self._BaseForecast__inner['chanceofrain'])

@property
def chances_of_remdry(self) -> int:
""":class:`int`: Chances of a rem dry in percent."""
def chances_of_remaining_dry(self) -> int:
""":class:`int`: Chances of remaining dry in percent."""

return int(self._BaseForecast__inner['chanceofremdry'])

@property
def chances_of_remdry(self) -> int:
""":class:`int`: Deprecated, use chances_of_remaining_dry instead."""

warnings.warn('Deprecated as of v1.1.1. Use `chances_of_remaining_dry` instead.', DeprecationWarning)
return self.chances_of_remaining_dry

@property
def chances_of_snow(self) -> int:
""":class:`int`: Chances of a snow in percent."""
Expand Down

0 comments on commit 2dd56f0

Please sign in to comment.