diff --git a/python/lvmnps/actor/actor.py b/python/lvmnps/actor/actor.py index 3da9604..3ff7a65 100644 --- a/python/lvmnps/actor/actor.py +++ b/python/lvmnps/actor/actor.py @@ -10,6 +10,7 @@ import asyncio import os + from typing import ClassVar, Dict import click diff --git a/python/lvmnps/actor/commands/onoff.py b/python/lvmnps/actor/commands/onoff.py index e6456e7..fe0ccd3 100644 --- a/python/lvmnps/actor/commands/onoff.py +++ b/python/lvmnps/actor/commands/onoff.py @@ -9,6 +9,7 @@ from __future__ import annotations import asyncio + from typing import TYPE_CHECKING import click diff --git a/python/lvmnps/switch/dli/dli.py b/python/lvmnps/switch/dli/dli.py index 229b372..5665bc4 100644 --- a/python/lvmnps/switch/dli/dli.py +++ b/python/lvmnps/switch/dli/dli.py @@ -11,6 +11,7 @@ import asyncio import logging + from typing import TYPE_CHECKING import httpx diff --git a/python/lvmnps/switch/netio/Netio/Device.py b/python/lvmnps/switch/netio/Netio/Device.py index df8f3f7..e846b78 100644 --- a/python/lvmnps/switch/netio/Netio/Device.py +++ b/python/lvmnps/switch/netio/Netio/Device.py @@ -2,6 +2,7 @@ import json from abc import abstractmethod from enum import IntEnum + from typing import Dict, List import requests diff --git a/python/lvmnps/switch/netio/Netio/cli.py b/python/lvmnps/switch/netio/Netio/cli.py index e6a2ece..71c5734 100644 --- a/python/lvmnps/switch/netio/Netio/cli.py +++ b/python/lvmnps/switch/netio/Netio/cli.py @@ -8,9 +8,10 @@ import os import sys import traceback -from typing import List from urllib.parse import urlparse, urlunparse +from typing import List + import pkg_resources import requests diff --git a/python/lvmnps/switch/powerswitchbase.py b/python/lvmnps/switch/powerswitchbase.py index 30cfca9..5c561ee 100644 --- a/python/lvmnps/switch/powerswitchbase.py +++ b/python/lvmnps/switch/powerswitchbase.py @@ -109,7 +109,7 @@ def g(config, key, d=None): else c if len(k) < 2 else g(c, k[1], d) - if type(c) is dict + if isinstance(c, dict) else d ) diff --git a/tests/test_async.py b/tests/test_async.py index c71caa1..ca2d4e2 100644 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -4,6 +4,7 @@ from __future__ import annotations import asyncio + from typing import Any from lvmnps.actor.actor import NPSActor