Skip to content

Commit 7ddc32a

Browse files
committed
Removed unnecessary indentation in docstring example
1 parent d5817b0 commit 7ddc32a

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

adafruit_httpserver/response.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,38 @@ class HTTPResponse:
2929
3030
Example::
3131
32-
# Response with 'Content-Length' header
33-
@server.route(path, method)
34-
def route_func(request):
32+
# Response with 'Content-Length' header
33+
@server.route(path, method)
34+
def route_func(request):
3535
36-
response = HTTPResponse(request)
37-
response.send("Some content", content_type="text/plain")
36+
response = HTTPResponse(request)
37+
response.send("Some content", content_type="text/plain")
3838
39-
# or
39+
# or
4040
41-
response = HTTPResponse(request)
42-
with response:
43-
response.send(body='Some content', content_type="text/plain")
41+
response = HTTPResponse(request)
42+
with response:
43+
response.send(body='Some content', content_type="text/plain")
4444
45-
# or
45+
# or
4646
47-
with HTTPResponse(request) as response:
48-
response.send("Some content", content_type="text/plain")
47+
with HTTPResponse(request) as response:
48+
response.send("Some content", content_type="text/plain")
4949
50-
# Response with 'Transfer-Encoding: chunked' header
51-
@server.route(path, method)
52-
def route_func(request):
50+
# Response with 'Transfer-Encoding: chunked' header
51+
@server.route(path, method)
52+
def route_func(request):
5353
54-
response = HTTPResponse(request, content_type="text/plain", chunked=True)
55-
with response:
56-
response.send_chunk("Some content")
57-
response.send_chunk("Some more content")
54+
response = HTTPResponse(request, content_type="text/plain", chunked=True)
55+
with response:
56+
response.send_chunk("Some content")
57+
response.send_chunk("Some more content")
5858
59-
# or
59+
# or
6060
61-
with HTTPResponse(request, content_type="text/plain", chunked=True) as response:
62-
response.send_chunk("Some content")
63-
response.send_chunk("Some more content")
61+
with HTTPResponse(request, content_type="text/plain", chunked=True) as response:
62+
response.send_chunk("Some content")
63+
response.send_chunk("Some more content")
6464
"""
6565

6666
request: HTTPRequest

0 commit comments

Comments
 (0)