We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1144cc3 commit e25732fCopy full SHA for e25732f
src/python_opensky/opensky.py
@@ -26,6 +26,9 @@
26
from typing_extensions import Self
27
28
29
+VERSION = metadata.version(__package__)
30
+
31
32
@dataclass
33
class OpenSky:
34
"""Main class for handling connections with OpenSky."""
@@ -97,7 +100,6 @@ async def _request(
97
100
OpenSkyrror: Received an unexpected response from the OpenSky API.
98
101
99
102
"""
- version = metadata.version(__package__)
103
url = URL.build(
104
scheme="https",
105
host=self.api_host,
@@ -106,7 +108,7 @@ async def _request(
106
108
).joinpath(uri)
107
109
110
headers = {
- "User-Agent": f"PythonOpenSky/{version}",
111
+ "User-Agent": f"PythonOpenSky/{VERSION}",
112
"Accept": "application/json, text/plain, */*",
113
}
114
0 commit comments