Use dataclass for DhcpServiceInfo#60136
Conversation
|
Hey there @bdraco, mind taking a look at this pull request as it has been labeled with an integration ( |
|
cc @Jc2k for the original idea |
|
Side note: is there any way for a developper to stop actions and release the CI agents on their own PR? |
|
And I think this needs the |
7bbe5f1 to
7bfceb0
Compare
bdraco
left a comment
There was a problem hiding this comment.
LGTM 👍
I like this solution quite a bit more.
|
@MartinHjelmare am I missing something?
core/homeassistant/config_entries.py Lines 1383 to 1387 in 4aae088
core/homeassistant/helpers/config_entry_flow.py Lines 86 to 93 in 4aae088 Components can continue using |
|
When the flow is started the data entry flow manager eventually calls core/homeassistant/data_entry_flow.py Line 304 in 4aae088 |
|
Is this the only place where something is missing? I can adjust the type hint: Or create a base class |
|
I looked over it briefly now and I think that's the only place. The other places already had the data input typed as Any of the above suggestions are fine. The latter is shorter and more easily extendable so I'd recommend that. |
1eea353 to
1f5f35b
Compare
|
All checks have passed, the comments from @MartinHjelmare have been addressed. |
Breaking change
Dhcp discovery now uses a dataclass instead of a dictionary object.
Access using
__getitem__will fail in version 2022.6.Please use
<cls>.<name>instead.Proposed change
Dhcp discovery now uses a dataclass instead of a dictionary object.
Access using
__getitem__will fail in version 2022.6.Please use
<cls>.<name>instead.Linked to this comment in the architecture discussion home-assistant/architecture#662 (comment)
Type of change
Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: