From d563a93f118f8b512362a32cd07012a8b9c8aa8a Mon Sep 17 00:00:00 2001 From: Matt Traudt <sirmatt@ksu.edu> Date: Sat, 7 Apr 2018 08:34:29 -0400 Subject: [PATCH] Specify the return value is a string --- sbws/util/sockio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbws/util/sockio.py b/sbws/util/sockio.py index 1773141f..26a0b625 100644 --- a/sbws/util/sockio.py +++ b/sbws/util/sockio.py @@ -18,9 +18,9 @@ def read_line(s, max_len=None, log_fn=print): :param func log_fn: Function with a signature similar to ``print`` to call if an error occurs :raises UnicodeDecodeError: If any byte is not a valid utf8 byte - :returns: Everything read up until a newline and with a maximum length of - **max_len**. If nothing could be read, returns None. If a newline is - the first character, returns an empty string. + :returns: Everything read up until a newline as a str and with a maximum + length of **max_len**. If nothing could be read, returns None. If a + newline is the first character, returns an empty str. ''' assert isinstance(s, socket.socket) assert max_len is None or (isinstance(max_len, int) and max_len > 0) -- GitLab