source: trunk/src/allmydata/scripts/types_.py

Last change on this file was 90188ce, checked in by Itamar Turner-Trauring <itamar@…>, at 2022-07-18T15:05:03Z

More Python 3 tweaks.

  • Property mode set to 100644
File size: 474 bytes
Line 
1"""
2Type definitions used by modules in this package.
3"""
4
5from typing import List, Tuple, Type, Sequence, Any
6from twisted.python.usage import Options
7
8
9# Historically, subcommands were implemented as lists, but due to a
10# [designed contraint in mypy](https://stackoverflow.com/a/52559625/70170),
11# a Tuple is required.
12SubCommand = Tuple[str, None, Type[Options], str]
13
14SubCommands = List[SubCommand]
15
16Parameters = List[Sequence[Any]]
17
18Flags = List[Tuple[str, None, str]]
Note: See TracBrowser for help on using the repository browser.