diff --git a/setup.py b/setup.py index 69a69b2..6ad728e 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,6 @@ def requirements(): "Operating System :: OS Independent", "Topic :: Software Development", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -44,5 +43,5 @@ def requirements(): test_suite="runtests.runtests", entry_points={"nose.plugins": []}, packages=find_packages(), - python_requires=">=3.6", + python_requires=">=3.7", ) diff --git a/tuya_iot/asset.py b/tuya_iot/asset.py index a65de81..632be1b 100644 --- a/tuya_iot/asset.py +++ b/tuya_iot/asset.py @@ -1,4 +1,5 @@ """Tuya asset api.""" +from __future__ import annotations from typing import Any diff --git a/tuya_iot/device.py b/tuya_iot/device.py index 429d60e..352fdba 100644 --- a/tuya_iot/device.py +++ b/tuya_iot/device.py @@ -1,4 +1,5 @@ """Tuya device api.""" +from __future__ import annotations import time from abc import ABCMeta, abstractclassmethod @@ -642,6 +643,8 @@ def get_device_stream_allocate( return response["result"]["url"] return None + def get_device_statistics_ + def send_commands( self, device_id: str, commands: list[dict[str, Any]] ) -> dict[str, Any]: diff --git a/tuya_iot/home.py b/tuya_iot/home.py index b086f18..18ab253 100644 --- a/tuya_iot/home.py +++ b/tuya_iot/home.py @@ -1,4 +1,5 @@ """Tuya home's api base on asset and device api.""" +from __future__ import annotations from types import SimpleNamespace from typing import Any diff --git a/tuya_iot/openapi.py b/tuya_iot/openapi.py index a2c6e80..7ba48d2 100644 --- a/tuya_iot/openapi.py +++ b/tuya_iot/openapi.py @@ -1,5 +1,4 @@ """Tuya Open API.""" - from __future__ import annotations import hashlib @@ -248,7 +247,9 @@ def __request( headers["dev_channel"] = self.dev_channel if self.token_info is not None: - refresh_token_api = TO_C_REFRESH_TOKEN_API.format(self.token_info.refresh_token) + refresh_token_api = TO_C_REFRESH_TOKEN_API.format( + self.token_info.refresh_token + ) if refresh_token_api == path: headers["dev_lang"] = "python" headers["dev_version"] = VERSION diff --git a/tuya_iot/openlogging.py b/tuya_iot/openlogging.py index c0eb408..3b1a015 100644 --- a/tuya_iot/openlogging.py +++ b/tuya_iot/openlogging.py @@ -1,4 +1,5 @@ """Tuya iot logging.""" +from __future__ import annotations import copy import logging diff --git a/tuya_iot/openmq.py b/tuya_iot/openmq.py index ab4fbec..aaa2b69 100644 --- a/tuya_iot/openmq.py +++ b/tuya_iot/openmq.py @@ -1,4 +1,5 @@ """Tuya Open IOT HUB which base on MQTT.""" +from __future__ import annotations import base64 import json