-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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 missing type hints for AndroidTV #96554
Conversation
Hey there @JeffLIrion, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice change! Small remark
device_class = aftv.DEVICE_CLASS | ||
device_type = ( | ||
PREFIX_ANDROIDTV if device_class == DEVICE_ANDROIDTV else PREFIX_FIRETV | ||
) | ||
# CONF_NAME may be present in entry.data for configuration imported from YAML | ||
device_name = entry.data.get(CONF_NAME) or f"{device_type} {entry.data[CONF_HOST]}" | ||
device_name: str = ( | ||
entry.data.get(CONF_NAME) or f"{device_type} {entry.data[CONF_HOST]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
entry.data.get(CONF_NAME) or f"{device_type} {entry.data[CONF_HOST]}" | |
entry.data.get(CONF_NAME, f"{device_type} {entry.data[CONF_HOST]}") |
I know it's been here before, but this does the same :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, done
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Proposed change
Add missing type hints for AndroidTV
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
.To help with the load of incoming pull requests: