From 7df1ae9602e0b5425ccfd9a1351e059fbbdfce89 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Wed, 26 Feb 2014 11:06:20 -0800 Subject: [PATCH] Start cleaning up info field lists --- paramiko/agent.py | 11 ++++++----- paramiko/buffered_pipe.py | 23 ++++++++++------------- paramiko/channel.py | 4 ++-- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/paramiko/agent.py b/paramiko/agent.py index cdb4313..d9f4b1b 100644 --- a/paramiko/agent.py +++ b/paramiko/agent.py @@ -52,8 +52,9 @@ class AgentSSH(object): no SSH agent was running (or it couldn't be contacted), an empty list will be returned. - :return: a list of keys available on the SSH agent - :rtype: tuple of `.AgentKey` + :return: + a tuple of `.AgentKey` objects representing keys available on the + SSH agent """ return self._keys @@ -235,7 +236,7 @@ class AgentClientProxy(object): class AgentServerProxy(AgentSSH): """ - :param t: transport used for SSH Agent communication forwarding + :param .Transport t: Transport used for SSH Agent communication forwarding :raises SSHException: mostly if we lost the agent """ @@ -273,8 +274,8 @@ class AgentServerProxy(AgentSSH): """ Helper for the environnement under unix - :return: the SSH_AUTH_SOCK Environnement variables - :rtype: dict + :return: + a dict containing the ``SSH_AUTH_SOCK`` environnement variables """ env = {} env['SSH_AUTH_SOCK'] = self._get_filename() diff --git a/paramiko/buffered_pipe.py b/paramiko/buffered_pipe.py index 43bfa47..a4be5d8 100644 --- a/paramiko/buffered_pipe.py +++ b/paramiko/buffered_pipe.py @@ -54,8 +54,7 @@ class BufferedPipe (object): buffer has been closed), the event will be set. When no data is ready, the event will be cleared. - :param event: the event to set/clear - :type event: Event + :param threading.Event event: the event to set/clear """ self._event = event if len(self._buffer) > 0: @@ -68,8 +67,7 @@ class BufferedPipe (object): Feed new data into this pipe. This method is assumed to be called from a separate thread, so synchronization is done. - :param data: the data to add - :type data: str + :param data: the data to add, as a `str` """ self._lock.acquire() try: @@ -86,9 +84,9 @@ class BufferedPipe (object): feeder. A ``False`` result does not mean that the feeder has closed; it means you may need to wait before more data arrives. - :return: ``True`` if a `read` call would immediately return at least - one byte; ``False`` otherwise. - :rtype: bool + :return: + ``True`` if a `read` call would immediately return at least one + byte; ``False`` otherwise. """ self._lock.acquire() try: @@ -113,8 +111,7 @@ class BufferedPipe (object): :param int nbytes: maximum number of bytes to read :param float timeout: maximum seconds to wait (or ``None``, the default, to wait forever) - :return: data - :rtype: str + :return: the read data, as a `str` :raises PipeTimeout: if a timeout was specified and no data was ready before that @@ -157,8 +154,9 @@ class BufferedPipe (object): """ Clear out the buffer and return all data that was in it. - :return: any data that was in the buffer prior to clearing it out - :rtype: str + :return: + any data that was in the buffer prior to clearing it out, as a + `str` """ self._lock.acquire() try: @@ -188,8 +186,7 @@ class BufferedPipe (object): """ Return the number of bytes buffered. - :return: number of bytes buffered - :rtype: int + :return: number (`int`) of bytes buffered """ self._lock.acquire() try: diff --git a/paramiko/channel.py b/paramiko/channel.py index 85d988b..3d48e2a 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -142,8 +142,8 @@ class Channel (object): :param height_pixels: height (in pixels) of the terminal screen :type height_pixels: int - :raises SSHException: if the request was rejected or the channel was - closed + :raises SSHException: + if the request was rejected or the channel was closed """ if self.closed or self.eof_received or self.eof_sent or not self.active: raise SSHException('Channel is not open')