Skip to content

Commit 328e249

Browse files
authored
fix typos again (#203)
Found via `codespell -H`
1 parent d73ed58 commit 328e249

File tree

11 files changed

+24
-24
lines changed

11 files changed

+24
-24
lines changed

SSGI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class SSGIHttpResponse:
1515
# send chunk of data, can be used to perform with less backpressure than using send
1616
# total_size is the sum of all lengths in bytes of all chunks to be sended
1717
# connection will end when total_size is met
18-
# returns tuple(bool, bool) first bool represents if the chunk is succefully sended, the second if the connection has ended
18+
# returns tuple(bool, bool) first bool represents if the chunk is successfully sended, the second if the connection has ended
1919
def send_chunk(self, chunk: Union[str, bytes, bytearray, memoryview], total_size: int = False) -> Awaitable:
2020
pass
2121

bench/asgi_wsgi/raw-wsgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def app_hello(environ, start_response):
6464

6565
# run_app() # run app on the main process too :)
6666

67-
# # sigint everything to gracefull shutdown
67+
# # sigint everything to graceful shutdown
6868
# import signal
6969
# for pid in pid_list:
7070
# os.kill(pid, signal.SIGINT)

docs/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Options:
3030
--ws-close-on-backpressure-limit BOOLEAN Close connections that hits maximum backpressure [default: False]
3131
--lifespan [auto|on|off] Lifespan implementation. [default: auto]
3232
--interface [auto|asgi|asgi3|wsgi|ssgi|socketify] Select ASGI (same as ASGI3), ASGI3, WSGI or SSGI as the application interface. [default: auto]
33-
--disable-listen-log BOOLEAN Disable log when start listenning [default: False]
33+
--disable-listen-log BOOLEAN Disable log when start listening [default: False]
3434
--version or -v Display the socketify.py version and exit.
3535
--ssl-keyfile TEXT SSL key file
3636
--ssl-certfile TEXT SSL certificate file

examples/forks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def run_app():
2727

2828
run_app() # run app on the main process too :)
2929

30-
# sigint everything to gracefull shutdown
30+
# sigint everything to graceful shutdown
3131
import signal
3232
for pid in pid_list:
3333
os.kill(pid, signal.SIGINT)

examples/middleware_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def middleware(*functions):
77
def middleware_route(res, req):
88
data = None
9-
# cicle to all middlewares
9+
# circle to all middlewares
1010
for function in functions:
1111
# call middlewares
1212
data = function(res, req, data)

src/socketify/asgi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def listen(self, port_or_options, handler=None):
688688
asgi_app = self
689689
self.is_starting = True
690690
self.is_stopped = False
691-
self.status = 0 # 0 starting, 1 ok, 2 error, 3 stoping, 4 stopped, 5 stopped with error, 6 no lifespan
691+
self.status = 0 # 0 starting, 1 ok, 2 error, 3 stopping, 4 stopped, 5 stopped with error, 6 no lifespan
692692
self.status_message = ""
693693
self.stop_future = self.server.loop.create_future()
694694

@@ -850,7 +850,7 @@ def run_task():
850850

851851
if block:
852852
run_task() # run app on the main process too :)
853-
# sigint everything to gracefull shutdown
853+
# sigint everything to graceful shutdown
854854
import signal
855855
for pid in pid_list:
856856
os.kill(pid, signal.SIGINT)

src/socketify/cli.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
--ws-close-on-backpressure-limit BOOLEAN Close connections that hits maximum backpressure [default: False]
2929
--lifespan [auto|on|off] Lifespan implementation. [default: auto]
3030
--interface [auto|asgi|asgi3|wsgi|ssgi|socketify] Select ASGI (same as ASGI3), ASGI3, WSGI or SSGI as the application interface. [default: auto]
31-
--disable-listen-log BOOLEAN Disable log when start listenning [default: False]
31+
--disable-listen-log BOOLEAN Disable log when start listening [default: False]
3232
--version or -v Display the socketify.py version and exit.
3333
--ssl-keyfile TEXT SSL key file
3434
--ssl-certfile TEXT SSL certificate file
@@ -188,10 +188,10 @@ def execute(args):
188188

189189
elif interface == "ssgi":
190190
# if not is_ssgi(module):
191-
# return print("SSGI is in development yet but is comming soon")
191+
# return print("SSGI is in development yet but is coming soon")
192192
# from . import SSGI as Interface
193193
# interface = "ssgi"
194-
return print("SSGI is in development yet but is comming soon")
194+
return print("SSGI is in development yet but is coming soon")
195195
elif interface != "socketify":
196196
return print(f"{interface} interface is not supported yet")
197197

@@ -322,7 +322,7 @@ def run_app():
322322

323323
run_app() # run app on the main process too :)
324324

325-
# sigint everything to gracefull shutdown
325+
# sigint everything to graceful shutdown
326326
import signal
327327
for pid in pid_list:
328328
os.kill(pid, signal.SIGINT)

src/socketify/helpers.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async def sendfile(res, req, filename):
7070

7171
def send_headers(res):
7272
res.write_status(status)
73-
# tells the broswer the last modified date
73+
# tells the browser the last modified date
7474
res.write_header(b"Last-Modified", last_modified)
7575

7676
# tells the browser that we support range
@@ -147,7 +147,7 @@ def middleware(*functions):
147147

148148
# we use Optional data=None at the end so you can use and middleware inside a middleware
149149
def optimized_middleware_route(res, req, data=None):
150-
# cicle to all middlewares
150+
# circle to all middlewares
151151
for function in syncs:
152152
# call middlewares
153153
data = function(res, req, data)
@@ -156,7 +156,7 @@ def optimized_middleware_route(res, req, data=None):
156156
return
157157

158158
async def wrapper(res, req, data):
159-
# cicle to all middlewares
159+
# circle to all middlewares
160160
for function in asyncs:
161161
# detect if is coroutine or not
162162
if inspect.iscoroutinefunction(function):
@@ -182,7 +182,7 @@ async def wrapper(res, req, data):
182182
def sync_middleware(*functions):
183183
# we use Optional data=None at the end so you can use and middleware inside a middleware
184184
def middleware_route(res, req, data=None):
185-
# cicle to all middlewares
185+
# circle to all middlewares
186186
for function in functions:
187187
# call middlewares
188188
data = function(res, req, data)
@@ -198,7 +198,7 @@ def async_middleware(*functions):
198198
# we use Optional data=None at the end so you can use and middleware inside a middleware
199199
async def middleware_route(res, req, data=None):
200200
some_async_as_run = False
201-
# cicle to all middlewares
201+
# circle to all middlewares
202202
for function in functions:
203203
# detect if is coroutine or not
204204
if inspect.iscoroutinefunction(function):

src/socketify/loop.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _keep_alive(self):
101101
self.loop.call_later(self.idle_relaxation_time, self._keep_alive)
102102
else:
103103
self.uv_loop.run_nowait()
104-
# be more agressive when needed
104+
# be more aggressive when needed
105105
self.loop.call_soon(self._keep_alive)
106106

107107
def create_task(self, *args, **kwargs):
@@ -194,7 +194,7 @@ def get_native_loop(self):
194194
return self.uv_loop.get_native_loop()
195195

196196
def _run_async_pypy(self, task, response=None):
197-
# this garanties error 500 in case of uncaught exceptions, and can trigger the custom error handler
197+
# this guarantees error 500 in case of uncaught exceptions, and can trigger the custom error handler
198198
# using an coroutine wrapper generates less overhead than using add_done_callback
199199
# this is an custom task/future with less overhead and that calls the first step
200200
future = self._task_factory(
@@ -203,7 +203,7 @@ def _run_async_pypy(self, task, response=None):
203203
return None # this future maybe already done and reused not safe to await
204204

205205
def _run_async_cpython(self, task, response=None):
206-
# this garanties error 500 in case of uncaught exceptions, and can trigger the custom error handler
206+
# this guarantees error 500 in case of uncaught exceptions, and can trigger the custom error handler
207207
# using an coroutine wrapper generates less overhead than using add_done_callback
208208
# this is an custom task/future with less overhead and that calls the first step
209209
future = create_task(self.loop, task_wrapper(self.exception_handler, self.loop, response, task))

src/socketify/ssgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def send(self, payload: Union[str, bytes, bytearray, memoryview, None], has_more
2525
# send chunk of data, can be used to perform with less backpressure than using send
2626
# total_size is the sum of all lengths in bytes of all chunks to be sended
2727
# connection will end when total_size is met
28-
# returns tuple(bool, bool) first bool represents if the chunk is succefully sended, the second if the connection has ended
28+
# returns tuple(bool, bool) first bool represents if the chunk is successfully sended, the second if the connection has ended
2929
def send_chunk(self, chunk: Union[bytes, bytearray, memoryview], total_size: int) -> Awaitable:
3030
return self.res.send_chunk(chunk, total_size)
3131

0 commit comments

Comments
 (0)