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

Begin to fix type errors #13

Closed
wants to merge 4 commits into from
Closed

Begin to fix type errors #13

wants to merge 4 commits into from

Conversation

jsvana
Copy link
Contributor

@jsvana jsvana commented Oct 22, 2024

Test plan: Enter the project, create and activate virtual env, and:

$ pip install -r requirements.txt
$ mypy .

Goal is to remove as many as I can to make it easier to confidently add new functionality.

Ran `flake8` on `devices/` and cleared out as many warnings as I could
(ignoring line length warnings).

The changes should be fine but I can't prove it as I don't have a
testing Home Assistant setup yet (I run HAOS at home) and don't have
line of sight on setting one up.

LMK what you think!
The majority of the various feeder and fountain classes were copied from
one another. This is an effort to make them easier to maintain by
placing the code in one place while maintaining the same interface as
before.

As with PR jjjonesjr33#11 I still don't have a testing Home Assistant setup so I
need to get that running first to verify that this actually works.
Test plan: Enter the project, create and activate virtual env, and:

```
$ pip install -r requirements.txt
$ mypy .
```

Goal is to remove as many as I can to make it easier to confidently add
new functionality
@jsvana
Copy link
Contributor Author

jsvana commented Oct 22, 2024

Most of the remaining typing errors are from returning data from a dict. I opened issue #14 to help this. If we document the expected structure of the APIs we can change the API responses in our code to instead be dataclasses or something similar and can better leverage type hints :)

@jjjonesjr33 jjjonesjr33 self-assigned this Oct 22, 2024
@jjjonesjr33 jjjonesjr33 added In review Pending review Deferred put off (an action or event) to a later time; postpone labels Oct 22, 2024
@jjjonesjr33 jjjonesjr33 removed the In review Pending review label Nov 10, 2024
@jsvana jsvana closed this Nov 26, 2024
@jjjonesjr33 jjjonesjr33 self-requested a review December 13, 2024 23:34
@jjjonesjr33 jjjonesjr33 modified the milestones: General Issues, Other Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deferred put off (an action or event) to a later time; postpone
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants