From 2f82f163841023a16b54b7d8b61701e44e0a5c92 Mon Sep 17 00:00:00 2001 From: Guy Khmelnitsky <3136012+GuyKh@users.noreply.github.com> Date: Sun, 17 Nov 2024 10:12:09 +0200 Subject: [PATCH] fix: No Trace fix (#76) * fix: No Trace fix * fix: double slash fix --- ims_envista/const.py | 6 +++--- ims_envista/ims_envista.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ims_envista/const.py b/ims_envista/const.py index 6376f9e..02d316c 100644 --- a/ims_envista/const.py +++ b/ims_envista/const.py @@ -9,9 +9,9 @@ GET_ALL_REGIONS_DATA_URL = ENVISTA_REGIONS_URL GET_SPECIFIC_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}" GET_SPECIFIC_REGION_DATA_URL = ENVISTA_REGIONS_URL + "/{}" -GET_LATEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data/{}/latest" -GET_EARLIEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data/{}/earliest" -GET_DAILY_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data/{}/daily" +GET_LATEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/latest" +GET_EARLIEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/earliest" +GET_DAILY_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/daily" GET_STATION_DATA_BY_DATE_URL = GET_DAILY_STATION_DATA_URL + "/{}/{}/{}" GET_MONTHLY_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/monthly" diff --git a/ims_envista/ims_envista.py b/ims_envista/ims_envista.py index 108e8c2..165bdee 100644 --- a/ims_envista/ims_envista.py +++ b/ims_envista/ims_envista.py @@ -59,7 +59,7 @@ def _shutdown(self) -> None: asyncio.run(self._session.close()) @staticmethod - def _get_channel_id_url_part(channel_id: int) -> str: + def _get_channel_id_url_part(channel_id: int | None) -> str: """Get specific Channel Id url param.""" if channel_id: return "/" + str(channel_id) @@ -74,7 +74,7 @@ async def get_latest_station_data( Args: ---- station_id (int): IMS Station Id - channel_id (int): [Optional] Specific Channel Id + channel_id (int | None): [Optional] Specific Channel Id Returns: -------