mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +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,16 +1,15 @@
|
||||
from _typeshed import AnyPath
|
||||
from typing import Any, Optional, Pattern
|
||||
from typing import Any, Optional, Pattern, Text
|
||||
|
||||
# rx can be any object with a 'search' method; once we have Protocols we can change the type
|
||||
def compile_dir(
|
||||
dir: AnyPath,
|
||||
dir: Text,
|
||||
maxlevels: int = ...,
|
||||
ddir: Optional[AnyPath] = ...,
|
||||
ddir: Optional[Text] = ...,
|
||||
force: bool = ...,
|
||||
rx: Optional[Pattern[Any]] = ...,
|
||||
quiet: int = ...,
|
||||
) -> int: ...
|
||||
def compile_file(
|
||||
fullname: AnyPath, ddir: Optional[AnyPath] = ..., force: bool = ..., rx: Optional[Pattern[Any]] = ..., quiet: int = ...
|
||||
fullname: Text, ddir: Optional[Text] = ..., force: bool = ..., rx: Optional[Pattern[Any]] = ..., quiet: int = ...
|
||||
) -> int: ...
|
||||
def compile_path(skip_curdir: bool = ..., maxlevels: int = ..., force: bool = ..., quiet: int = ...) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user