mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import IO, Any, Callable, List, Tuple
|
||||
from typing import IO, Any, Callable
|
||||
|
||||
class Cmd:
|
||||
prompt: str
|
||||
@@ -14,7 +14,7 @@ class Cmd:
|
||||
use_rawinput: bool
|
||||
stdin: IO[str]
|
||||
stdout: IO[str]
|
||||
cmdqueue: List[str]
|
||||
cmdqueue: list[str]
|
||||
completekey: str
|
||||
def __init__(self, completekey: str = ..., stdin: IO[str] | None = ..., stdout: IO[str] | None = ...) -> None: ...
|
||||
old_completer: Callable[[str, int], str | None] | None
|
||||
@@ -23,17 +23,17 @@ class Cmd:
|
||||
def postcmd(self, stop: bool, line: str) -> bool: ...
|
||||
def preloop(self) -> None: ...
|
||||
def postloop(self) -> None: ...
|
||||
def parseline(self, line: str) -> Tuple[str | None, str | None, str]: ...
|
||||
def parseline(self, line: str) -> tuple[str | None, str | None, 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: List[str] | None
|
||||
def complete(self, text: str, state: int) -> List[str] | None: ...
|
||||
def get_names(self) -> List[str]: ...
|
||||
def completedefault(self, *ignored: Any) -> list[str]: ...
|
||||
def completenames(self, text: str, *ignored: Any) -> list[str]: ...
|
||||
completion_matches: list[str] | None
|
||||
def complete(self, text: str, state: int) -> list[str] | None: ...
|
||||
def get_names(self) -> list[str]: ...
|
||||
# Only the first element of args matters.
|
||||
def complete_help(self, *args: Any) -> List[str]: ...
|
||||
def complete_help(self, *args: Any) -> list[str]: ...
|
||||
def do_help(self, arg: str) -> bool | None: ...
|
||||
def print_topics(self, header: str, cmds: List[str] | None, cmdlen: Any, maxcol: int) -> None: ...
|
||||
def columnize(self, list: List[str] | None, displaywidth: int = ...) -> None: ...
|
||||
def print_topics(self, header: str, cmds: list[str] | None, cmdlen: Any, maxcol: int) -> None: ...
|
||||
def columnize(self, list: list[str] | None, displaywidth: int = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user