Enable ruff check for ANN (#1139)

This commit is contained in:
Teemu R.
2024-11-10 19:55:13 +01:00
committed by GitHub
parent 6b44fe6242
commit 66eb17057e
89 changed files with 596 additions and 452 deletions

View File

@@ -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