chore: Revised code linter
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
# Native modules
|
||||
import logging
|
||||
import os
|
||||
from typing import Dict, Any, Optional
|
||||
|
||||
# Third-party modules
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
import asyncio
|
||||
from crossfit_booker import CrossFitBooker
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -10,14 +10,12 @@ import requests
|
||||
from dateutil.parser import parse
|
||||
import pytz
|
||||
from dotenv import load_dotenv
|
||||
from urllib.parse import urlencode
|
||||
from typing import List, Dict, Optional, Any, Tuple
|
||||
from typing import List, Dict, Optional, Any
|
||||
|
||||
# Import the SessionNotifier class
|
||||
from src.session_notifier import SessionNotifier
|
||||
|
||||
# Import the preferred sessions from the session_config module
|
||||
from src.session_config import PREFERRED_SESSIONS
|
||||
|
||||
# Import the AuthHandler class
|
||||
from src.auth import AuthHandler
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# Native modules
|
||||
import logging
|
||||
import os
|
||||
from typing import Dict, Any, Optional, List
|
||||
from datetime import date, datetime
|
||||
|
||||
@@ -4,7 +4,7 @@ import pytz
|
||||
import time
|
||||
from datetime import date
|
||||
from typing import List, Dict, Optional, Any
|
||||
from datetime import datetime, timedelta, date
|
||||
from datetime import datetime
|
||||
|
||||
# Third-party modules
|
||||
import requests
|
||||
@@ -164,7 +164,7 @@ class SessionManager:
|
||||
logging.warning(f"Request failed (attempt {retry+1}/3): {str(e)}. Retrying in {wait_time}s...")
|
||||
time.sleep(wait_time)
|
||||
|
||||
logging.error(f"Failed to complete request after 3 attempts")
|
||||
logging.error("Failed to complete request after 3 attempts")
|
||||
return False
|
||||
|
||||
def get_booked_sessions(self) -> List[Dict[str, Any]]:
|
||||
@@ -208,7 +208,7 @@ class SessionManager:
|
||||
logging.warning(f"Request failed (attempt {retry+1}/3): {str(e)}. Retrying in {wait_time}s...")
|
||||
time.sleep(wait_time)
|
||||
|
||||
logging.error(f"Failed to complete request after 3 attempts")
|
||||
logging.error("Failed to complete request after 3 attempts")
|
||||
return []
|
||||
|
||||
def is_session_bookable(self, session: Dict[str, Any], current_time: datetime) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user