Skip to content

Commit d547c7f

Browse files
committed
Fixed and extended docstrings
1 parent f1878b3 commit d547c7f

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

adafruit_httpserver/headers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
class HTTPHeaders:
1717
"""
18-
A dict-like object for storing HTTP headers.
18+
A dict-like class for storing HTTP headers.
1919
2020
Allows access to headers using **case insensitive** names.
2121

adafruit_httpserver/request.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ class HTTPRequest:
4747
"""
4848

4949
raw_request: bytes
50-
"""Raw bytes passed to the constructor."""
50+
"""
51+
Raw 'bytes' passed to the constructor and body 'bytes' received later.
52+
53+
Should **not** be modified directly.
54+
"""
5155

5256
def __init__(self, raw_request: bytes = None) -> None:
5357
self.raw_request = raw_request

adafruit_httpserver/server.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,10 @@ def request_buffer_size(self, value: int) -> None:
211211
def socket_timeout(self) -> int:
212212
"""
213213
Timeout after which the socket will stop waiting for more incoming data.
214-
When exceeded, raises `OSError` with `errno.ETIMEDOUT`.
215214
216-
Default timeout is 0, which means socket is in non-blocking mode.
215+
Must be set to positive integer or float. Default is 1 second.
216+
217+
When exceeded, raises `OSError` with `errno.ETIMEDOUT`.
217218
218219
Example::
219220

0 commit comments

Comments
 (0)