Update typing 06 (#48039)

This commit is contained in:
Marc Mueller 2021-03-17 23:49:01 +01:00 committed by GitHub
parent 7c0734bdd5
commit 91df3fa904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 241 additions and 211 deletions

View file

@ -1,6 +1,7 @@
"""Support for Freebox devices (Freebox v6 and Freebox mini 4K)."""
from __future__ import annotations
from datetime import datetime
from typing import Dict
from homeassistant.components.device_tracker import SOURCE_TYPE_ROUTER
from homeassistant.components.device_tracker.config_entry import ScannerEntity
@ -52,7 +53,7 @@ def add_entities(router, async_add_entities, tracked):
class FreeboxDevice(ScannerEntity):
"""Representation of a Freebox device."""
def __init__(self, router: FreeboxRouter, device: Dict[str, any]) -> None:
def __init__(self, router: FreeboxRouter, device: dict[str, any]) -> None:
"""Initialize a Freebox device."""
self._router = router
self._name = device["primary_name"].strip() or DEFAULT_DEVICE_NAME
@ -105,12 +106,12 @@ class FreeboxDevice(ScannerEntity):
return self._icon
@property
def extra_state_attributes(self) -> Dict[str, any]:
def extra_state_attributes(self) -> dict[str, any]:
"""Return the attributes."""
return self._attrs
@property
def device_info(self) -> Dict[str, any]:
def device_info(self) -> dict[str, any]:
"""Return the device information."""
return {
"connections": {(CONNECTION_NETWORK_MAC, self._mac)},