Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3524,23 +3524,23 @@ def isatty(self) -> bool:
pass

@abstractmethod
def read(self, n: int = -1) -> AnyStr:
def read(self, n: int = -1, /) -> AnyStr:
pass

@abstractmethod
def readable(self) -> bool:
pass

@abstractmethod
def readline(self, limit: int = -1) -> AnyStr:
def readline(self, limit: int = -1, /) -> AnyStr:
pass

@abstractmethod
def readlines(self, hint: int = -1) -> list[AnyStr]:
def readlines(self, hint: int = -1, /) -> list[AnyStr]:
pass

@abstractmethod
def seek(self, offset: int, whence: int = 0) -> int:
def seek(self, offset: int, whence: int = 0, /) -> int:
pass

@abstractmethod
Expand All @@ -3552,27 +3552,27 @@ def tell(self) -> int:
pass

@abstractmethod
def truncate(self, size: int | None = None) -> int:
def truncate(self, size: int | None = None, /) -> int:
pass

@abstractmethod
def writable(self) -> bool:
pass

@abstractmethod
def write(self, s: AnyStr) -> int:
def write(self, s: AnyStr, /) -> int:
pass

@abstractmethod
def writelines(self, lines: list[AnyStr]) -> None:
def writelines(self, lines: list[AnyStr], /) -> None:
pass

@abstractmethod
def __enter__(self) -> IO[AnyStr]:
pass

@abstractmethod
def __exit__(self, type, value, traceback) -> None:
def __exit__(self, type, value, traceback, /) -> None:
pass


Expand All @@ -3582,7 +3582,7 @@ class BinaryIO(IO[bytes]):
__slots__ = ()

@abstractmethod
def write(self, s: bytes | bytearray) -> int:
def write(self, s: bytes | bytearray, /) -> int:
pass

@abstractmethod
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
``typing.IO`` and ``typing.BinaryIO`` method arguments are now
positional-only.
Loading