Update typing 09 (#48059)
This commit is contained in:
parent
2ab640aaef
commit
283b4abe67
39 changed files with 239 additions and 196 deletions
|
@ -1,8 +1,9 @@
|
|||
"""iCloud account."""
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
import logging
|
||||
import operator
|
||||
from typing import Dict, Optional
|
||||
|
||||
from pyicloud import PyiCloudService
|
||||
from pyicloud.exceptions import (
|
||||
|
@ -95,7 +96,7 @@ class IcloudAccount:
|
|||
|
||||
self._icloud_dir = icloud_dir
|
||||
|
||||
self.api: Optional[PyiCloudService] = None
|
||||
self.api: PyiCloudService | None = None
|
||||
self._owner_fullname = None
|
||||
self._family_members_fullname = {}
|
||||
self._devices = {}
|
||||
|
@ -345,7 +346,7 @@ class IcloudAccount:
|
|||
return self._owner_fullname
|
||||
|
||||
@property
|
||||
def family_members_fullname(self) -> Dict[str, str]:
|
||||
def family_members_fullname(self) -> dict[str, str]:
|
||||
"""Return the account family members fullname."""
|
||||
return self._family_members_fullname
|
||||
|
||||
|
@ -355,7 +356,7 @@ class IcloudAccount:
|
|||
return self._fetch_interval
|
||||
|
||||
@property
|
||||
def devices(self) -> Dict[str, any]:
|
||||
def devices(self) -> dict[str, any]:
|
||||
"""Return the account devices."""
|
||||
return self._devices
|
||||
|
||||
|
@ -496,11 +497,11 @@ class IcloudDevice:
|
|||
return self._battery_status
|
||||
|
||||
@property
|
||||
def location(self) -> Dict[str, any]:
|
||||
def location(self) -> dict[str, any]:
|
||||
"""Return the Apple device location."""
|
||||
return self._location
|
||||
|
||||
@property
|
||||
def state_attributes(self) -> Dict[str, any]:
|
||||
def state_attributes(self) -> dict[str, any]:
|
||||
"""Return the attributes."""
|
||||
return self._attrs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue