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,7 +1,7 @@
|
||||
import os
|
||||
import sys
|
||||
from genericpath import exists as exists
|
||||
from typing import Any, AnyStr, Callable, List, Sequence, Text, Tuple, TypeVar, overload
|
||||
from typing import Any, AnyStr, Callable, Sequence, Text, TypeVar, overload
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -74,11 +74,11 @@ def relpath(path: Text, start: Text | None = ...) -> Text: ...
|
||||
def samefile(f1: Text, f2: Text) -> bool: ...
|
||||
def sameopenfile(fp1: int, fp2: int) -> bool: ...
|
||||
def samestat(s1: os.stat_result, s2: os.stat_result) -> bool: ...
|
||||
def split(p: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
|
||||
def splitdrive(p: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
|
||||
def splitext(p: AnyStr) -> Tuple[AnyStr, AnyStr]: ...
|
||||
def split(p: AnyStr) -> tuple[AnyStr, AnyStr]: ...
|
||||
def splitdrive(p: AnyStr) -> tuple[AnyStr, AnyStr]: ...
|
||||
def splitext(p: AnyStr) -> tuple[AnyStr, AnyStr]: ...
|
||||
|
||||
if sys.platform == "win32":
|
||||
def splitunc(p: AnyStr) -> Tuple[AnyStr, AnyStr]: ... # deprecated
|
||||
def splitunc(p: AnyStr) -> tuple[AnyStr, AnyStr]: ... # deprecated
|
||||
|
||||
def walk(path: AnyStr, visit: Callable[[_T, AnyStr, List[AnyStr]], Any], arg: _T) -> None: ...
|
||||
def walk(path: AnyStr, visit: Callable[[_T, AnyStr, list[AnyStr]], Any], arg: _T) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user