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

Improve config flow type hints in starline #125202

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

epenet
Copy link
Contributor

@epenet epenet commented Sep 4, 2024

Proposed change

SSIA, linked to #124316

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

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
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

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.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Sep 4, 2024

Hey there @Anonym-tsk, mind taking a look at this pull request as it has been labeled with an integration (starline) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of starline can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign starline Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@Anonym-tsk
Copy link
Contributor

LGTM

@epenet
Copy link
Contributor Author

epenet commented Sep 4, 2024

Note: the codecov failures are not linked to this PR.
It would be good if coverage could be improved by the code-owner in a follow-up PR.

Before:

---------- coverage: platform linux, python 3.12.3-final-0 -----------
Name                                                  Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------
homeassistant/components/starline/__init__.py            50     35    30%   31-92, 97-103, 108-114
homeassistant/components/starline/account.py             94     39    59%   30-32, 56, 60-78, 82, 100, 112-118, 124-130, 136-142, 147, 159, 167, 176, 186, 194
homeassistant/components/starline/binary_sensor.py       21     21     0%   3-93
homeassistant/components/starline/button.py              22     22     0%   3-57
homeassistant/components/starline/config_flow.py        105     27    74%   77, 81-84, 88-91, 140-144, 160-164, 210-221
homeassistant/components/starline/const.py               22      0   100%
homeassistant/components/starline/device_tracker.py      33     33     0%   3-63
homeassistant/components/starline/entity.py              27     27     0%   3-48
homeassistant/components/starline/lock.py                35     35     0%   3-77
homeassistant/components/starline/sensor.py              67     67     0%   3-174
homeassistant/components/starline/switch.py              38     38     0%   3-93
-----------------------------------------------------------------------------------
TOTAL                                                   514    344    33%

After:

---------- coverage: platform linux, python 3.12.5-final-0 -----------
Name                                                  Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------------------
homeassistant/components/starline/__init__.py            50     35    30%   31-92, 97-103, 108-114
homeassistant/components/starline/account.py             94     39    59%   30-32, 56, 60-78, 82, 100, 112-118, 124-130, 136-142, 147, 159, 167, 176, 186, 194
homeassistant/components/starline/binary_sensor.py       21     21     0%   3-93
homeassistant/components/starline/button.py              22     22     0%   3-57
homeassistant/components/starline/config_flow.py        104     27    74%   80, 86-89, 95-98, 147-151, 167-171, 221-232
homeassistant/components/starline/const.py               22      0   100%
homeassistant/components/starline/device_tracker.py      33     33     0%   3-63
homeassistant/components/starline/entity.py              27     27     0%   3-48
homeassistant/components/starline/lock.py                35     35     0%   3-77
homeassistant/components/starline/sensor.py              67     67     0%   3-174
homeassistant/components/starline/switch.py              38     38     0%   3-93
-----------------------------------------------------------------------------------
TOTAL                                                   513    344    33%

@epenet epenet added the smash Indicator this PR is close to finish for merging or closing label Sep 4, 2024
@joostlek joostlek merged commit 643fd34 into home-assistant:dev Sep 4, 2024
27 of 28 checks passed
@epenet epenet deleted the 20240904-0916 branch September 4, 2024 16:42
iloveicedgreentea pushed a commit to iloveicedgreentea/core that referenced this pull request Sep 4, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed code-quality integration: starline Quality Scale: No score smash Indicator this PR is close to finish for merging or closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants