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:
@@ -3,6 +3,8 @@
|
||||
Taken from the click help files.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
|
||||
import asyncclick as click
|
||||
@@ -11,7 +13,7 @@ import asyncclick as click
|
||||
class LazyGroup(click.Group):
|
||||
"""Lazy group class."""
|
||||
|
||||
def __init__(self, *args, lazy_subcommands=None, **kwargs):
|
||||
def __init__(self, *args, lazy_subcommands=None, **kwargs) -> None:
|
||||
super().__init__(*args, **kwargs)
|
||||
# lazy_subcommands is a map of the form:
|
||||
#
|
||||
@@ -31,9 +33,9 @@ class LazyGroup(click.Group):
|
||||
return self._lazy_load(cmd_name)
|
||||
return super().get_command(ctx, cmd_name)
|
||||
|
||||
def format_commands(self, ctx, formatter):
|
||||
def format_commands(self, ctx, formatter) -> None:
|
||||
"""Format the top level help output."""
|
||||
sections = {}
|
||||
sections: dict[str, list] = {}
|
||||
for cmd, parent in self.lazy_subcommands.items():
|
||||
sections.setdefault(parent, [])
|
||||
cmd_obj = self.get_command(ctx, cmd)
|
||||
|
Reference in New Issue
Block a user