Skip to content

Commit

Permalink
Linted and formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberjunky committed Nov 21, 2023
1 parent 6adfb76 commit dee6649
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion .pdm-python

This file was deleted.

6 changes: 4 additions & 2 deletions garminconnect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ def __init__(self, email=None, password=None, is_cn=False):
self.garmin_connect_gear = "/gear-service/gear/filterGear"
self.garmin_connect_gear_baseurl = "/gear-service/gear/"

self.garmin_request_reload_url = "/wellness-service/wellness/epoch/request"
self.garmin_request_reload_url = (
"/wellness-service/wellness/epoch/request"
)

self.garth = garth.Client(
domain="garmin.cn" if is_cn else "garmin.com"
Expand Down Expand Up @@ -722,7 +724,7 @@ def get_device_settings(self, device_id: str) -> Dict[str, Any]:

return self.connectapi(url)

def get_device_alarms(self) -> Dict[str, Any]:
def get_device_alarms(self) -> List[str, Any]:
"""Get list of active alarms from all devices."""

logger.debug("Requesting device alarms")
Expand Down
4 changes: 2 additions & 2 deletions tests/test_garmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def test_upload(garmin):
def test_request_reload(garmin):
garmin.login()
cdate = "2021-01-01"
assert sum(steps['steps'] for steps in garmin.get_steps_data(cdate)) == 0
assert sum(steps["steps"] for steps in garmin.get_steps_data(cdate)) == 0
assert garmin.request_reload(cdate)
# In practice, the data can take a while to load
assert sum(steps['steps'] for steps in garmin.get_steps_data(cdate)) > 0
assert sum(steps["steps"] for steps in garmin.get_steps_data(cdate)) > 0

0 comments on commit dee6649

Please sign in to comment.