Postponed evaluation of annotations for integrations (#46455)

This commit is contained in:
Franck Nijhof 2021-02-12 18:54:00 +01:00 committed by GitHub
parent 061d9c5293
commit dd8d4471ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 54 additions and 22 deletions

View file

@ -1,4 +1,6 @@
"""Helpers to deal with Cast devices."""
from __future__ import annotations
from typing import Optional
import attr
@ -57,7 +59,7 @@ class ChromecastInfo:
return None
return CAST_MANUFACTURERS.get(self.model_name.lower(), "Google Inc.")
def fill_out_missing_chromecast_info(self) -> "ChromecastInfo":
def fill_out_missing_chromecast_info(self) -> ChromecastInfo:
"""Return a new ChromecastInfo object with missing attributes filled in.
Uses blocking HTTP / HTTPS.