mirror of
https://github.com/Andre0512/pyhOn.git
synced 2025-05-14 15:14:28 -04:00
Add more type hints
This commit is contained in:
parent
ad0d065b03
commit
9eb99f283b
30 changed files with 392 additions and 243 deletions
|
@ -32,12 +32,14 @@ class HonDevice:
|
|||
def mobile_id(self) -> str:
|
||||
return self._mobile_id
|
||||
|
||||
def get(self, mobile: bool = False) -> Dict:
|
||||
result = {
|
||||
def get(self, mobile: bool = False) -> Dict[str, str | int]:
|
||||
result: Dict[str, str | int] = {
|
||||
"appVersion": self.app_version,
|
||||
"mobileId": self.mobile_id,
|
||||
"os": self.os,
|
||||
"osVersion": self.os_version,
|
||||
"deviceModel": self.device_model,
|
||||
}
|
||||
return (result | {"mobileOs": result.pop("os")}) if mobile else result
|
||||
if mobile:
|
||||
result |= {"mobileOs": result.pop("os", "")}
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue