From acd9862fae4343549cdb1136248b336b4e83aecd Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Thu, 23 Mar 2017 08:23:52 -0700 Subject: [PATCH] stubs for tabnanny (#1068) --- stdlib/2and3/tabnanny.pyi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 stdlib/2and3/tabnanny.pyi diff --git a/stdlib/2and3/tabnanny.pyi b/stdlib/2and3/tabnanny.pyi new file mode 100644 index 000000000..5209ef8f4 --- /dev/null +++ b/stdlib/2and3/tabnanny.pyi @@ -0,0 +1,22 @@ +# Stubs for tabnanny (Python 2 and 3) + +import os +import sys +from typing import Iterable, Tuple, Union + +if sys.version_info >= (3, 6): + _Path = Union[str, bytes, os.PathLike] +else: + _Path = Union[str, bytes] + +verbose = ... # type: int +filename_only = ... # type: int + +class NannyNag(Exception): + def __init__(self, lineno: int, msg: str, line: str) -> None: ... + def get_lineno(self) -> int: ... + def get_msg(self) -> str: ... + def get_line(self) -> str: ... + +def check(file: _Path) -> None: ... +def process_tokens(tokens: Iterable[Tuple[int, str, Tuple[int, int], Tuple[int, int], str]]) -> None: ...