mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Add stubs for cmd (#1128)
This commit is contained in:
committed by
Matthias Kramm
parent
b9616f1517
commit
26f5ffd5ba
41
stdlib/2and3/cmd.pyi
Normal file
41
stdlib/2and3/cmd.pyi
Normal file
@@ -0,0 +1,41 @@
|
||||
# Stubs for cmd (Python 2/3)
|
||||
|
||||
from typing import Any, Optional, Text, IO, List, Callable, Tuple
|
||||
|
||||
class Cmd:
|
||||
prompt = ... # type: str
|
||||
identchars = ... # type: str
|
||||
ruler = ... # type: str
|
||||
lastcmd = ... # type: str
|
||||
intro = ... # type: Optional[Any]
|
||||
doc_leader = ... # type: str
|
||||
doc_header = ... # type: str
|
||||
misc_header = ... # type: str
|
||||
undoc_header = ... # type: str
|
||||
nohelp = ... # type: str
|
||||
use_rawinput = ... # type: bool
|
||||
stdin = ... # type: IO[str]
|
||||
stdout = ... # type: IO[str]
|
||||
cmdqueue = ... # type: List[str]
|
||||
completekey = ... # type: str
|
||||
def __init__(self, completekey: str = ..., stdin: Optional[IO[str]] = ..., stdout: Optional[IO[str]] = ...) -> None: ...
|
||||
old_completer = ... # type: Optional[Callable[[str, int], Optional[str]]]
|
||||
def cmdloop(self, intro: Optional[Any] = ...) -> None: ...
|
||||
def precmd(self, line: str) -> str: ...
|
||||
def postcmd(self, stop: bool, line: str) -> bool: ...
|
||||
def preloop(self) -> None: ...
|
||||
def postloop(self) -> None: ...
|
||||
def parseline(self, line: str) -> Tuple[Optional[str], Optional[str], str]: ...
|
||||
def onecmd(self, line: str) -> bool: ...
|
||||
def emptyline(self) -> bool: ...
|
||||
def default(self, line: str) -> bool: ...
|
||||
def completedefault(self, *ignored: Any) -> List[str]: ...
|
||||
def completenames(self, text: str, *ignored: Any) -> List[str]: ...
|
||||
completion_matches = ... # type: Optional[List[str]]
|
||||
def complete(self, text: str, state: int) -> Optional[List[str]]: ...
|
||||
def get_names(self) -> List[str]: ...
|
||||
# Only the first element of args matters.
|
||||
def complete_help(self, *args: Any) -> List[str]: ...
|
||||
def do_help(self, arg: Optional[str]) -> None: ...
|
||||
def print_topics(self, header: str, cmds: Optional[List[str]], cmdlen: Any, maxcol: int) -> None: ...
|
||||
def columnize(self, list: Optional[List[str]], displaywidth: int = ...) -> None: ...
|
||||
Reference in New Issue
Block a user