From 1ec148e866983acf22277b8b3df45ed5b13f2307 Mon Sep 17 00:00:00 2001 From: stanislas Date: Wed, 21 Feb 2024 23:47:32 +0100 Subject: [PATCH] refactored code to place the booking specific actions inside a gestion-sports element --- resa_padel/gestion_sports/gestion_sports_operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resa_padel/gestion_sports/gestion_sports_operations.py b/resa_padel/gestion_sports/gestion_sports_operations.py index de10d9b..1c06881 100644 --- a/resa_padel/gestion_sports/gestion_sports_operations.py +++ b/resa_padel/gestion_sports/gestion_sports_operations.py @@ -12,7 +12,7 @@ LOGGER = logging.getLogger(__name__) class GestionSportsOperations: def __init__(self, club: Club): - self.platform: GestionSportsConnector = None + self.platform: GestionSportsConnector | None = None self.club: Club = club self.session: ClientSession | None = None @@ -30,7 +30,7 @@ class GestionSportsOperations: await self.platform.land() await self.platform.login(user, self.club) - self.wait_until_booking_time(self.club, booking_filter) + wait_until_booking_time(self.club, booking_filter) return await self.platform.book(booking_filter, self.club)