-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Jelle Zijlstra <[email protected]>
- Loading branch information
1 parent
6816cf4
commit a375953
Showing
24 changed files
with
247 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,14 @@ | ||
def newer(source: str, target: str) -> bool: ... | ||
def newer_pairwise(sources: list[str], targets: list[str]) -> list[tuple[str, str]]: ... | ||
def newer_group(sources: list[str], target: str, missing: str = "error") -> bool: ... | ||
from _typeshed import StrOrBytesPath, SupportsLenAndGetItem | ||
from collections.abc import Iterable | ||
from typing import Literal, TypeVar | ||
|
||
_SourcesT = TypeVar("_SourcesT", bound=StrOrBytesPath) | ||
_TargetsT = TypeVar("_TargetsT", bound=StrOrBytesPath) | ||
|
||
def newer(source: StrOrBytesPath, target: StrOrBytesPath) -> bool | Literal[1]: ... | ||
def newer_pairwise( | ||
sources: SupportsLenAndGetItem[_SourcesT], targets: SupportsLenAndGetItem[_TargetsT] | ||
) -> tuple[list[_SourcesT], list[_TargetsT]]: ... | ||
def newer_group( | ||
sources: Iterable[StrOrBytesPath], target: StrOrBytesPath, missing: Literal["error", "ignore", "newer"] = "error" | ||
) -> Literal[0, 1]: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,38 @@ | ||
from collections.abc import Sequence | ||
from typing import Literal | ||
from _typeshed import BytesPath, StrOrBytesPath, StrPath | ||
from collections.abc import Iterable | ||
from typing import Literal, TypeVar, overload | ||
|
||
_StrPathT = TypeVar("_StrPathT", bound=StrPath) | ||
_BytesPathT = TypeVar("_BytesPathT", bound=BytesPath) | ||
|
||
@overload | ||
def copy_file( | ||
src: StrPath, | ||
dst: _StrPathT, | ||
preserve_mode: bool | Literal[0, 1] = 1, | ||
preserve_times: bool | Literal[0, 1] = 1, | ||
update: bool | Literal[0, 1] = 0, | ||
link: str | None = None, | ||
verbose: bool | Literal[0, 1] = 1, | ||
dry_run: bool | Literal[0, 1] = 0, | ||
) -> tuple[_StrPathT | str, bool]: ... | ||
@overload | ||
def copy_file( | ||
src: str, | ||
dst: str, | ||
src: BytesPath, | ||
dst: _BytesPathT, | ||
preserve_mode: bool | Literal[0, 1] = 1, | ||
preserve_times: bool | Literal[0, 1] = 1, | ||
update: bool | Literal[0, 1] = 0, | ||
link: str | None = None, | ||
verbose: bool | Literal[0, 1] = 1, | ||
dry_run: bool | Literal[0, 1] = 0, | ||
) -> tuple[str, str]: ... | ||
def move_file(src: str, dst: str, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0) -> str: ... | ||
def write_file(filename: str, contents: Sequence[str]) -> None: ... | ||
) -> tuple[_BytesPathT | bytes, bool]: ... | ||
@overload | ||
def move_file( | ||
src: StrPath, dst: _StrPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0 | ||
) -> _StrPathT | str: ... | ||
@overload | ||
def move_file( | ||
src: BytesPath, dst: _BytesPathT, verbose: bool | Literal[0, 1] = 0, dry_run: bool | Literal[0, 1] = 0 | ||
) -> _BytesPathT | bytes: ... | ||
def write_file(filename: StrOrBytesPath, contents: Iterable[str]) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,17 @@ | ||
from typing import Literal | ||
from _typeshed import StrOrBytesPath | ||
from collections.abc import Callable, Iterable | ||
from typing import Literal, TypeVar | ||
|
||
def newer(source, target): ... | ||
def newer_pairwise(sources, targets, newer=...): ... | ||
def newer_group(sources, target, missing: Literal["error", "newer", "ignore"] = "error"): ... | ||
def newer_pairwise_group(sources, targets, *, newer=...): ... | ||
_SourcesT = TypeVar("_SourcesT", bound=StrOrBytesPath) | ||
_TargetsT = TypeVar("_TargetsT", bound=StrOrBytesPath) | ||
|
||
def newer(source: StrOrBytesPath, target: StrOrBytesPath) -> bool: ... | ||
def newer_pairwise( | ||
sources: Iterable[_SourcesT], targets: Iterable[_TargetsT], newer: Callable[[_SourcesT, _TargetsT], bool] = ... | ||
) -> tuple[list[_SourcesT], list[_TargetsT]]: ... | ||
def newer_group( | ||
sources: Iterable[StrOrBytesPath], target: StrOrBytesPath, missing: Literal["error", "ignore", "newer"] = "error" | ||
) -> bool: ... | ||
def newer_pairwise_group( | ||
sources: Iterable[_SourcesT], targets: Iterable[_TargetsT], *, newer: Callable[[_SourcesT, _TargetsT], bool] = ... | ||
) -> tuple[list[_SourcesT], list[_TargetsT]]: ... |
Oops, something went wrong.