mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
AnyStr cleanup (#5487)
* Replace all uses of StrPath, BytesPath, and AnyPath in Python 2 stubs. * Add StrOrBytesPath as preferred alias for AnyPath. * Replace all remaining AnyPath instances with StrOrBytesPath. * Mark AnyPath as obsolete. Part of #5470
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from _typeshed import AnyPath
|
||||
from _typeshed import StrOrBytesPath
|
||||
from types import CodeType
|
||||
from typing import Any, List, Sequence, Tuple
|
||||
|
||||
@@ -8,14 +8,14 @@ def sequence2st(sequence: Sequence[Any]) -> STType: ...
|
||||
def tuple2st(sequence: Sequence[Any]) -> STType: ...
|
||||
def st2list(st: STType, line_info: bool = ..., col_info: bool = ...) -> List[Any]: ...
|
||||
def st2tuple(st: STType, line_info: bool = ..., col_info: bool = ...) -> Tuple[Any]: ...
|
||||
def compilest(st: STType, filename: AnyPath = ...) -> CodeType: ...
|
||||
def compilest(st: STType, filename: StrOrBytesPath = ...) -> CodeType: ...
|
||||
def isexpr(st: STType) -> bool: ...
|
||||
def issuite(st: STType) -> bool: ...
|
||||
|
||||
class ParserError(Exception): ...
|
||||
|
||||
class STType:
|
||||
def compile(self, filename: AnyPath = ...) -> CodeType: ...
|
||||
def compile(self, filename: StrOrBytesPath = ...) -> CodeType: ...
|
||||
def isexpr(self) -> bool: ...
|
||||
def issuite(self) -> bool: ...
|
||||
def tolist(self, line_info: bool = ..., col_info: bool = ...) -> List[Any]: ...
|
||||
|
||||
Reference in New Issue
Block a user