Skip to content

Commit b1dfb0d

Browse files
committed
style: apply ruff format fixes
1 parent aa6d079 commit b1dfb0d

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

demo.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def __init__(self):
334334
},
335335
"u": {
336336
"desc": "Get scheduled workouts by year and month",
337-
"key": "get_scheduled_workouts_by_year_and_month",
337+
"key": "get_scheduled_workouts",
338338
},
339339
"v": {
340340
"desc": "Upload typed running workout (sample)",
@@ -2494,7 +2494,7 @@ def schedule_workout_data(api: Garmin) -> None:
24942494
print(f"❌ Error scheduling workout: {e}")
24952495

24962496

2497-
def get_scheduled_workouts_by_year_and_month(api: Garmin) -> None:
2497+
def get_scheduled_workouts(api: Garmin) -> None:
24982498
"""Get scheduled workout by year and month."""
24992499
try:
25002500
year_input = input("Enter year (YYYY): ").strip()
@@ -2508,11 +2508,11 @@ def get_scheduled_workouts_by_year_and_month(api: Garmin) -> None:
25082508
month = int(month_input)
25092509

25102510
call_and_display(
2511-
api.get_scheduled_workouts_by_year_and_month,
2511+
api.get_scheduled_workouts,
25122512
year,
25132513
month,
2514-
method_name="get_scheduled_workouts_by_year_and_month",
2515-
api_call_desc=f"api.get_scheduled_workouts_by_year_and_month({year}, {month})",
2514+
method_name="get_scheduled_workouts",
2515+
api_call_desc=f"api.get_scheduled_workouts({year}, {month})",
25162516
)
25172517
except Exception as e:
25182518
print(f"❌ Error getting scheduled workouts by year and month: {e}")
@@ -3963,9 +3963,7 @@ def execute_api_call(api: Garmin, key: str) -> None:
39633963
"get_scheduled_workout_by_id": lambda: get_scheduled_workout_by_id_data(
39643964
api
39653965
),
3966-
"get_scheduled_workouts_by_year_and_month": lambda: get_scheduled_workouts_by_year_and_month(
3967-
api
3968-
),
3966+
"get_scheduled_workouts": lambda: get_scheduled_workouts(api),
39693967
"scheduled_workout": lambda: schedule_workout_data(api),
39703968
"delete_workout": lambda: delete_workout_data(api),
39713969
"unschedule_workout": lambda: unschedule_workout_data(api),

garminconnect/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2727,7 +2727,7 @@ def upload_hiking_workout(self, workout: Any) -> dict[str, Any]:
27272727
"Install it with: pip install pydantic or pip install garminconnect[workout]"
27282728
) from None
27292729

2730-
def get_scheduled_workouts_by_year_and_month(
2730+
def get_scheduled_workouts(
27312731
self, year: int | str, month: int | str
27322732
) -> dict[str, Any]:
27332733
"""Return scheduled workout by year and month."""

0 commit comments

Comments
 (0)