pathlib: add newline to write_text() method (#6224)

Closes #6223
This commit is contained in:
Yehuda Davis
2021-11-02 22:46:50 -04:00
committed by GitHub
parent ce94db762c
commit 3d5f35c33b

View File

@@ -167,7 +167,12 @@ class Path(PurePath):
def read_text(self, encoding: str | None = ..., errors: str | None = ...) -> str: ...
def samefile(self, other_path: str | bytes | int | Path) -> bool: ...
def write_bytes(self, data: bytes) -> int: ...
def write_text(self, data: str, encoding: str | None = ..., errors: str | None = ...) -> int: ...
if sys.version_info >= (3, 10):
def write_text(
self, data: str, encoding: str | None = ..., errors: str | None = ..., newline: str | None = ...
) -> int: ...
else:
def write_text(self, data: str, encoding: str | None = ..., errors: str | None = ...) -> int: ...
if sys.version_info >= (3, 8):
def link_to(self, target: StrPath | bytes) -> None: ...