Skip to content

Ensure hass is typed#87068

Merged
balloob merged 9 commits into
home-assistant:devfrom
epenet:hass-typing
Feb 4, 2023
Merged

Ensure hass is typed#87068
balloob merged 9 commits into
home-assistant:devfrom
epenet:hass-typing

Conversation

@epenet

@epenet epenet commented Feb 1, 2023

Copy link
Copy Markdown
Contributor

Proposed change

I think the hass argument always refers to HomeAssistant, either as a compulsory or an optional argument.

This aims to enforce it:

  • if the function has partial annotation, then this will fail CI
  • if the function doesn't have any annotation, then it will only be displayed in IDE

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
  • The code has been formatted using Black (black --fast 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.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@epenet epenet marked this pull request as ready for review February 3, 2023 21:15
@epenet epenet requested review from a team, bdraco and bramkragten as code owners February 3, 2023 21:15
@epenet

epenet commented Feb 3, 2023

Copy link
Copy Markdown
Contributor Author

Aargh a new one slipped in!

@epenet epenet marked this pull request as draft February 3, 2023 21:53
@epenet epenet mentioned this pull request Feb 3, 2023
19 tasks
@epenet

epenet commented Feb 4, 2023

Copy link
Copy Markdown
Contributor Author

Needs #87371 merged

@epenet epenet marked this pull request as ready for review February 4, 2023 12:42
@balloob balloob merged commit f6c7637 into home-assistant:dev Feb 4, 2023
@balloob

balloob commented Feb 4, 2023

Copy link
Copy Markdown
Member

🎉 🎉 🎉 🎉 🎉

@epenet epenet deleted the hass-typing branch February 4, 2023 18:26
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed code-quality small-pr PRs with less than 30 lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants