Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions trogon/introspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Any, Callable, Sequence, NewType

import click
from click import BaseCommand, ParamType
from click import Command, ParamType


def generate_unique_id():
Expand Down Expand Up @@ -92,7 +92,7 @@ def path_from_root(self) -> list["CommandSchema"]:
return list(reversed(path))


def introspect_click_app(app: BaseCommand) -> dict[CommandName, CommandSchema]:
def introspect_click_app(app: Command) -> dict[CommandName, CommandSchema]:
"""
Introspect a Click application and build a data structure containing
information about all commands, options, arguments, and subcommands,
Expand All @@ -104,7 +104,7 @@ def introspect_click_app(app: BaseCommand) -> dict[CommandName, CommandSchema]:
command function references.

Args:
app (click.BaseCommand): The Click application's top-level group or command instance.
app (click.Command): The Click application's top-level group or command instance.

Returns:
Dict[str, CommandData]: A nested dictionary containing the Click application's
Expand Down