mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Enable ruff check for ANN (#1139)
This commit is contained in:
@@ -36,7 +36,7 @@ async def detail(ctx):
|
||||
auth_failed = []
|
||||
sem = asyncio.Semaphore()
|
||||
|
||||
async def print_unsupported(unsupported_exception: UnsupportedDeviceError):
|
||||
async def print_unsupported(unsupported_exception: UnsupportedDeviceError) -> None:
|
||||
unsupported.append(unsupported_exception)
|
||||
async with sem:
|
||||
if unsupported_exception.discovery_result:
|
||||
@@ -50,7 +50,7 @@ async def detail(ctx):
|
||||
|
||||
from .device import state
|
||||
|
||||
async def print_discovered(dev: Device):
|
||||
async def print_discovered(dev: Device) -> None:
|
||||
async with sem:
|
||||
try:
|
||||
await dev.update()
|
||||
@@ -189,7 +189,7 @@ async def config(ctx):
|
||||
error(f"Unable to connect to {host}")
|
||||
|
||||
|
||||
def _echo_dictionary(discovery_info: dict):
|
||||
def _echo_dictionary(discovery_info: dict) -> None:
|
||||
echo("\t[bold]== Discovery information ==[/bold]")
|
||||
for key, value in discovery_info.items():
|
||||
key_name = " ".join(x.capitalize() or "_" for x in key.split("_"))
|
||||
@@ -197,7 +197,7 @@ def _echo_dictionary(discovery_info: dict):
|
||||
echo(f"\t{key_name_and_spaces}{value}")
|
||||
|
||||
|
||||
def _echo_discovery_info(discovery_info):
|
||||
def _echo_discovery_info(discovery_info) -> None:
|
||||
# We don't have discovery info when all connection params are passed manually
|
||||
if discovery_info is None:
|
||||
return
|
||||
|
Reference in New Issue
Block a user