Skip to content

Commit bb7e2cd

Browse files
Accept byte paths in SFTP directory listing methods
1 parent 08ec766 commit bb7e2cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎stubs/paramiko/paramiko/sftp_client.pyi‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ class SFTPClient(BaseSFTP, ClosingContextManager):
2525
def from_transport(cls, t: Transport, window_size: int | None = None, max_packet_size: int | None = None) -> Self | None: ...
2626
def close(self) -> None: ...
2727
def get_channel(self) -> Channel | None: ...
28-
def listdir(self, path: str = ".") -> list[str]: ...
29-
def listdir_attr(self, path: str = ".") -> list[SFTPAttributes]: ...
28+
def listdir(self, path: bytes | str = ".") -> list[str]: ...
29+
def listdir_attr(self, path: bytes | str = ".") -> list[SFTPAttributes]: ...
3030
def listdir_iter(self, path: bytes | str = ".", read_aheads: int = 50) -> Iterator[SFTPAttributes]: ...
3131
def open(self, filename: bytes | str, mode: str = "r", bufsize: int = -1) -> SFTPFile: ...
3232
file = open

0 commit comments

Comments
 (0)