Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix get_device_alarms #178

Merged
merged 1 commit into from
Nov 23, 2023
Merged

Fix get_device_alarms #178

merged 1 commit into from
Nov 23, 2023

Conversation

theboywho
Copy link
Contributor

Replacing def get_device_alarms(self) -> List[str, Any]: with def get_device_alarms(self) -> Dict[str, Any]:

Closes #177

example.py fails to run with:
```
 ./example.py
Traceback (most recent call last):
  File "/Users/parminderdhillon/projects/python-garminconnect/./example.py", line 20, in <module>
    from garminconnect import (
  File "/Users/parminderdhillon/projects/python-garminconnect/garminconnect/__init__.py", line 15, in <module>
    class Garmin:
  File "/Users/parminderdhillon/projects/python-garminconnect/garminconnect/__init__.py", line 727, in Garmin
    def get_device_alarms(self) -> List[str, Any]:
                                   ~~~~^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 358, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 1569, in __getitem__
    _check_generic(self, params, self._nparams)
  File "/usr/local/Cellar/[email protected]/3.11.6_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/typing.py", line 286, in _check_generic
    raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments for {cls};"
TypeError: Too many arguments for typing.List; actual 2, expected 1
```
@cyberjunky
Copy link
Owner

Thank you fixing this bug/unwanted change.

@cyberjunky cyberjunky merged commit 7aaf755 into cyberjunky:master Nov 23, 2023
@theboywho theboywho deleted the patch-1 branch December 4, 2023 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors from get_device_alarms(self)
2 participants