use _typeshed's Path aliases (#4214)

This commit is contained in:
Jelle Zijlstra
2020-06-10 20:57:09 -07:00
committed by GitHub
parent 86f03f2d7b
commit 43e93f803f
42 changed files with 483 additions and 757 deletions
+3 -11
View File
@@ -1,13 +1,5 @@
# 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]
from _typeshed import AnyPath
from typing import Iterable, Tuple
verbose: int
filename_only: int
@@ -18,5 +10,5 @@ class NannyNag(Exception):
def get_msg(self) -> str: ...
def get_line(self) -> str: ...
def check(file: _Path) -> None: ...
def check(file: AnyPath) -> None: ...
def process_tokens(tokens: Iterable[Tuple[int, str, Tuple[int, int], Tuple[int, int], str]]) -> None: ...