Skip to content

Add strict type annotations to acer_projector#50657

Merged
frenck merged 5 commits intohome-assistant:devfrom
mib1185:acer_projector-typing
May 15, 2021
Merged

Add strict type annotations to acer_projector#50657
frenck merged 5 commits intohome-assistant:devfrom
mib1185:acer_projector-typing

Conversation

@mib1185
Copy link
Copy Markdown
Member

@mib1185 mib1185 commented May 15, 2021

Proposed change

Add strict type annotations.

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)
  • 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.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

Copy link
Copy Markdown
Member

@KapJI KapJI left a comment

Choose a reason for hiding this comment

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

Please move constants to const.py and make them Final.

Comment thread homeassistant/components/acer_projector/switch.py Outdated
Comment thread homeassistant/components/acer_projector/switch.py Outdated
@mib1185
Copy link
Copy Markdown
Member Author

mib1185 commented May 15, 2021

Please move constants to const.py and make them Final.

Is it really needed for a single component integration?
If yes, sure I will change it 😉

Comment thread homeassistant/components/acer_projector/switch.py Outdated
@KapJI
Copy link
Copy Markdown
Member

KapJI commented May 15, 2021

I think nicer structure is good. If someone will add another component, it will be easier to extend and maintain good structure.

@KapJI
Copy link
Copy Markdown
Member

KapJI commented May 15, 2021

Btw, this integration doesn't have a code owner. Should we add someone?

It was created very long time ago: #1913

@mib1185
Copy link
Copy Markdown
Member Author

mib1185 commented May 15, 2021

Btw, this integration doesn't have a code owner. Should we add someone?

My intention is to add annotations to integrations, which has no codeowner and therefore might never be touched - but honestly would not like to become the codeowner of them all 🙈
@deisi maybe you want to have a look into this and take over the codeowner-ship?! 😉

Copy link
Copy Markdown
Member

@KapJI KapJI left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Comment thread homeassistant/components/acer_projector/switch.py
@deisi
Copy link
Copy Markdown
Contributor

deisi commented May 15, 2021

I can become the code owner. I wouldn't mind. I haven't done too much for HA in the last months, but I can definitely step it up and take more responsibility for my Components.

However I don't really know what this means. I guess it means I have to bring the code in line with all the new developments going on. Is there some documentation available on when and what i need to do something?

@KapJI
Copy link
Copy Markdown
Member

KapJI commented May 15, 2021

Basically it means you'll be added as a reviewer to PRs which touch these components. Shouldn't be much traffic. There's no obligation to update them according to current standards.

Also you'll be pinged on issues related to these components.

@mib1185 can you update the manifest please? 🙂

@mib1185
Copy link
Copy Markdown
Member Author

mib1185 commented May 15, 2021

@mib1185 can you update the manifest please? slightly_smiling_face

If @deisi agree with that, than yeah sure 🙂

@KapJI
Copy link
Copy Markdown
Member

KapJI commented May 15, 2021

@deisi are you ok with that? 🙂

Copy link
Copy Markdown
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.

LGTM ✅ Thanks, @mib1185 👍

../Frenck 🚂

@frenck
Copy link
Copy Markdown
Member

frenck commented May 15, 2021

@mib1185 Existing codeowner doesn't have to agree. If you want to help out as a codeowner, then, please add yourself. Any help anywhere is always welcomed 👍

@mib1185
Copy link
Copy Markdown
Member Author

mib1185 commented May 15, 2021

@frenck: until now, there is no codeowner defined, but @deisi was asked to takeover the owner ship, since he was the creator of this integration 😉

@frenck
Copy link
Copy Markdown
Member

frenck commented May 15, 2021

@mib1185 Right, but that isn't related to this PR.
So let's merge once this passes 👍

@mib1185
Copy link
Copy Markdown
Member Author

mib1185 commented May 15, 2021

ah ... no I get what you mean 🙂 👍

@deisi
Copy link
Copy Markdown
Contributor

deisi commented May 15, 2021

@deisi are you ok with that? slightly_smiling_face

I'm fine with that :)

@frenck frenck merged commit 562e0d7 into home-assistant:dev May 15, 2021
@mib1185 mib1185 deleted the acer_projector-typing branch May 16, 2021 17:08
@github-actions github-actions Bot locked and limited conversation to collaborators May 17, 2021
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.

5 participants