diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-02-26 11:06:20 -0800 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-02-26 11:06:20 -0800 |
commit | 7df1ae9602e0b5425ccfd9a1351e059fbbdfce89 (patch) | |
tree | e3e9f33a0dd3585a0c925372acc4fae08c9ca6ca /paramiko/buffered_pipe.py | |
parent | 33452b2e6c7f7c48d7bfa6fcf770b1d27d6af2d6 (diff) | |
download | paramiko-7df1ae9602e0b5425ccfd9a1351e059fbbdfce89.tar.gz |
Start cleaning up info field lists
Diffstat (limited to 'paramiko/buffered_pipe.py')
-rw-r--r-- | paramiko/buffered_pipe.py | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/paramiko/buffered_pipe.py b/paramiko/buffered_pipe.py index 43bfa47d..a4be5d8d 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: |