Allow SubCommands to be defined with any Options

This commit is contained in:
Jean-Paul Calderone 2021-03-17 15:17:19 -04:00
parent 91873d5a15
commit 6955154824

@ -1,11 +1,11 @@
from typing import List, Tuple, Type, Sequence, Any
from allmydata.scripts.common import BaseOptions
from twisted.python.usage import Options
# Historically, subcommands were implemented as lists, but due to a
# [designed contraint in mypy](https://stackoverflow.com/a/52559625/70170),
# a Tuple is required.
SubCommand = Tuple[str, None, Type[BaseOptions], str]
SubCommand = Tuple[str, None, Type[Options], str]
SubCommands = List[SubCommand]