python-weather 2.0.6__tar.gz → 2.0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-weather
3
- Version: 2.0.6
3
+ Version: 2.0.7
4
4
  Summary: A free and asynchronous weather API wrapper made in Python, for Python.
5
5
  Author: null8626
6
6
  License: MIT
@@ -3,7 +3,7 @@ requires = ["setuptools"]
3
3
 
4
4
  [project]
5
5
  name = "python-weather"
6
- version = "2.0.6"
6
+ version = "2.0.7"
7
7
  description = "A free and asynchronous weather API wrapper made in Python, for Python."
8
8
  readme = "README.md"
9
9
  license = { text = "MIT" }
@@ -31,7 +31,7 @@ __title__ = 'python-weather'
31
31
  __author__ = 'null8626'
32
32
  __license__ = 'MIT'
33
33
  __copyright__ = 'Copyright (c) 2021-2024 null8626'
34
- __version__ = '2.0.6'
34
+ __version__ = '2.0.7'
35
35
  __all__ = (
36
36
  'METRIC',
37
37
  'IMPERIAL',
@@ -23,8 +23,8 @@ SOFTWARE.
23
23
  """
24
24
 
25
25
  from aiohttp import ClientSession, ClientTimeout, TCPConnector
26
- from typing import Optional, Tuple, Self
27
26
  from urllib.parse import quote_plus
27
+ from typing import Optional, Tuple
28
28
  from asyncio import sleep
29
29
 
30
30
  from .errors import Error, RequestError
@@ -133,7 +133,7 @@ class Client(CustomizableBase):
133
133
  if self.__own_session and not self.__session.closed:
134
134
  await self.__session.close()
135
135
 
136
- async def __aenter__(self) -> Self:
136
+ async def __aenter__(self) -> 'Client':
137
137
  return self
138
138
 
139
139
  async def __aexit__(self, *_, **__) -> None:
@@ -23,7 +23,7 @@ SOFTWARE.
23
23
  """
24
24
 
25
25
  from enum import Enum
26
- from typing import Union, Tuple, Self
26
+ from typing import Union, Tuple
27
27
 
28
28
  from .constants import WIND_DIRECTION_EMOJIS
29
29
 
@@ -70,14 +70,14 @@ class HeatIndex(IndexedEnum):
70
70
  DANGER = None
71
71
  EXTREME_DANGER = None
72
72
 
73
- def _new(celcius_index: int, true_index: int) -> Self:
73
+ def _new(celcius_index: int, true_index: int) -> 'HeatIndex':
74
74
  enum = HeatIndex(celcius_index)
75
75
  enum.index = true_index
76
76
 
77
77
  return enum
78
78
 
79
79
  @classmethod
80
- def _missing_(self, celcius_index: int) -> Self:
80
+ def _missing_(self, celcius_index: int) -> 'HeatIndex':
81
81
  if celcius_index <= 32:
82
82
  return self.CAUTION
83
83
  elif celcius_index <= 39:
@@ -99,14 +99,14 @@ class UltraViolet(BasicEnum, IndexedEnum):
99
99
  VERY_HIGH = None
100
100
  EXTREME = None
101
101
 
102
- def _new(index: int) -> Self:
102
+ def _new(index: int) -> 'UltraViolet':
103
103
  enum = UltraViolet(index)
104
104
  enum.index = index
105
105
 
106
106
  return enum
107
107
 
108
108
  @classmethod
109
- def _missing_(self, index: int) -> Self:
109
+ def _missing_(self, index: int) -> 'UltraViolet':
110
110
  if index <= 2:
111
111
  return self.LOW
112
112
  elif index <= 5:
@@ -144,7 +144,7 @@ class WindDirection(BasicEnum):
144
144
  degrees: float
145
145
  """The wind direction's value in degrees."""
146
146
 
147
- def _new(value: str, degrees: float) -> Self:
147
+ def _new(value: str, degrees: float) -> 'WindDirection':
148
148
  enum = WindDirection(value)
149
149
  enum.degrees = degrees
150
150
 
@@ -310,7 +310,7 @@ class Kind(BasicEnum):
310
310
  THUNDERY_SNOW_SHOWERS = 392
311
311
 
312
312
  @classmethod
313
- def _missing_(self, value: int) -> Self:
313
+ def _missing_(self, value: int) -> 'Kind':
314
314
  if value in (248, 260):
315
315
  return self.FOG
316
316
  elif value in (263, 353):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-weather
3
- Version: 2.0.6
3
+ Version: 2.0.7
4
4
  Summary: A free and asynchronous weather API wrapper made in Python, for Python.
5
5
  Author: null8626
6
6
  License: MIT
File without changes
File without changes
File without changes