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

Add typings to OVO Energy integration #75944

Merged
merged 5 commits into from
Jan 16, 2023

Conversation

timmo001
Copy link
Contributor

@timmo001 timmo001 commented Jul 29, 2022

Proposed change

Adds missing typings to OVO Energy integration.

Type of change

  • Code quality improvements to existing code or addition of tests

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • 🥈 Silver

To help with the load of incoming pull requests:

@timmo001 timmo001 force-pushed the ovoenergy-typings branch 2 times, most recently from 10af83e to 9e268bc Compare August 5, 2022 15:11
@epenet
Copy link
Contributor

epenet commented Aug 5, 2022

You will also need to adjust the tests accordingly, and possibly the string.json

@timmo001
Copy link
Contributor Author

timmo001 commented Aug 5, 2022

I don't see what that change did, so have reverted back. user_input can be None, so long as it is handled imo

@epenet
Copy link
Contributor

epenet commented Aug 6, 2022

I don't see what that change did, so have reverted back. user_input can be None, so long as it is handled imo

The current implementation is buggy. It assumes that first call doesn't have any data, yet it does!
So the correct way to implement is to split into two steps. First step has the context data (never None) and confirm step can be None.

@epenet
Copy link
Contributor

epenet commented Aug 15, 2022

You have rebased multiple times but you are not adressing my review. The current implementation is still buggy.

@epenet
Copy link
Contributor

epenet commented Aug 23, 2022

See #75682 as an example for the correct way to implement reauth/reauth_confirm.

Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timmo001 👋

There is a merge conflict, could you take a quick look?

Thanks! 👍

../Frenck

@timmo001 timmo001 requested a review from frenck December 21, 2022 09:26
@frenck frenck merged commit 26c4197 into home-assistant:dev Jan 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants