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 Oct 28, 2024
1 parent 68fdcda commit b5a49f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools"]

[project]
name = "python-weather"
version = "1.1.0"
version = "1.1.1"
description = "A free and asynchronous weather API wrapper made in Python, for Python."
readme = "README.md"
license = { text = "MIT" }
Expand Down Expand Up @@ -38,4 +38,4 @@ requires-python = ">=3.8"

[project.urls]
repository = "https://github.com/null8626/python-weather"
download_url = "https://github.com/null8626/python-weather/archive/1.1.0.tar.gz"
download_url = "https://github.com/null8626/python-weather/archive/1.1.1.tar.gz"
15 changes: 13 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,21 @@ 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 b5a49f4

Please sign in to comment.