From c8d2fbf97caad617d9817029f0a6f928e81fd043 Mon Sep 17 00:00:00 2001 From: DurgNomis-drol Date: Sat, 4 Dec 2021 16:36:28 +0100 Subject: [PATCH] Revert commit and hopefully fix? --- glocaltokens/client.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/glocaltokens/client.py b/glocaltokens/client.py index 1635485..124fe86 100644 --- a/glocaltokens/client.py +++ b/glocaltokens/client.py @@ -5,7 +5,6 @@ import json import logging import random -from typing import Dict from gpsoauth import perform_master_login, perform_oauth import grpc @@ -337,7 +336,7 @@ def get_homegraph(self, auth_attempts: int = 3) -> GetHomeGraphResponse | None: def get_google_devices( self, models_list: list[str] | None = None, - discovery_address_dict: Dict[str, str] | None = None, + discovery_address_dict: dict[str, str] | None = None, zeroconf_instance: Zeroconf | None = None, force_homegraph_reload: bool = False, discovery_timeout: int = DISCOVERY_TIMEOUT, @@ -369,7 +368,7 @@ def get_google_devices( devices: list[Device] = [] - def is_dict_with_valid_ipv4_addresses(data: Dict[str, str]) -> bool: + def is_dict_with_valid_ipv4_addresses(data: dict[str, str]) -> bool: # Test if the data structure is correct and if each entry contains a # valid IPv4 address. return isinstance(data, dict) and all( @@ -418,7 +417,7 @@ def find_device(unique_id: str) -> NetworkDevice | None: # and accept all items. if models_list and item.hardware.model not in models_list: LOGGER.debug("%s not in models_list", item.hardware.model) - continue + continue network_device = None if network_devices: @@ -469,7 +468,7 @@ def get_google_devices_json( self, models_list: list[str] | None = None, indent: int = 2, - discovery_address_dict: Dict[str, str] | None = None, + discovery_address_dict: dict[str, str] | None = None, zeroconf_instance: Zeroconf | None = None, force_homegraph_reload: bool = False, ) -> str: