Skip to content

Commit

Permalink
Revert commit and hopefully fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
DurgNomis-drol committed Dec 4, 2021
1 parent c9c794c commit c8d2fbf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions glocaltokens/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import json
import logging
import random
from typing import Dict

from gpsoauth import perform_master_login, perform_oauth
import grpc
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c8d2fbf

Please sign in to comment.