Skip to content

Commit dc38c8d

Browse files
authored
Fix typos and improve documentation (#131)
1 parent d3ecf6e commit dc38c8d

File tree

10 files changed

+17
-17
lines changed

10 files changed

+17
-17
lines changed

docs/aiohttp.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Adds GraphQL support to your aiohttp application.
44

55
## Installation
66

7-
To install the integration with aiohttp, run the below command on your terminal.
7+
To install the integration with aiohttp, run the following command in your terminal.
88

99
`pip install graphql-server[aiohttp]`
1010

docs/flask.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Adds GraphQL support to your Flask application.
44

55
## Installation
66

7-
To install the integration with Flask, run the below command on your terminal.
7+
To install the integration with Flask, run the following command in your terminal.
88

99
`pip install graphql-server[flask]`
1010

docs/sanic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Adds GraphQL support to your Sanic application.
44

55
## Installation
66

7-
To install the integration with Sanic, run the below command on your terminal.
7+
To install the integration with Sanic, run the following command in your terminal.
88

99
`pip install graphql-server[sanic]`
1010

docs/webob.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Adds GraphQL support to your WebOb (Pyramid, Pylons, ...) application.
44

55
## Installation
66

7-
To install the integration with WebOb, run the below command on your terminal.
7+
To install the integration with WebOb, run the following command in your terminal.
88

99
`pip install graphql-server[webob]`
1010

src/graphql_server/channels/handlers/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ async def channel_listen(
9696
groups:
9797
An optional sequence of groups to receive messages from.
9898
When passing this parameter, the groups will be registered
99-
using `self.channel_layer.group_add` at the beggining of the
99+
using `self.channel_layer.group_add` at the beginning of the
100100
execution and then discarded using `self.channel_layer.group_discard`
101101
at the end of the execution.
102102
"""
@@ -155,7 +155,7 @@ async def listen_to_channel(
155155
groups:
156156
An optional sequence of groups to receive messages from.
157157
When passing this parameter, the groups will be registered
158-
using `self.channel_layer.group_add` at the beggining of the
158+
using `self.channel_layer.group_add` at the beginning of the
159159
execution and then discarded using `self.channel_layer.group_discard`
160160
at the end of the execution.
161161
"""
@@ -192,7 +192,7 @@ async def _listen_to_channel_generator(
192192
) -> AsyncGenerator[Any, None]:
193193
"""Generator for listen_to_channel method.
194194
195-
Seperated to allow user code to be run after subscribing to channels
195+
Separated to allow user code to be run after subscribing to channels
196196
and before blocking to wait for incoming channel messages.
197197
"""
198198
while True:

src/graphql_server/http/sync_base_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def parse_http_body(
170170
data = self.parse_multipart(request)
171171
elif self._is_multipart_subscriptions(content_type, params):
172172
raise HTTPException(
173-
400, "Multipart subcriptions are not supported in sync mode"
173+
400, "Multipart subscriptions are not supported in sync mode"
174174
)
175175
else:
176176
raise HTTPException(400, "Unsupported content type")

src/graphql_server/subscriptions/protocols/graphql_transport_ws/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ async def handle_message(self, message: Message) -> None:
162162

163163
async def handle_connection_init(self, message: ConnectionInitMessage) -> None:
164164
if self.connection_timed_out:
165-
# No way to reliably excercise this case during testing
165+
# No way to reliably exercise this case during testing
166166
return # pragma: no cover
167167

168168
if self.connection_init_timeout_task:
@@ -346,7 +346,7 @@ async def run_operation(self, operation: Operation[Context, RootValue]) -> None:
346346

347347
def forget_id(self, id: str) -> None:
348348
# de-register the operation id making it immediately available
349-
# for re-use
349+
# for reuse
350350
del self.operations[id]
351351

352352
async def handle_complete(self, message: CompleteMessage) -> None:

src/tests/http/test_graphql_over_http_spec.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ async def test_423l(http_client):
179179

180180
@pytest.mark.parametrize(
181181
"invalid",
182-
[{"obj": "ect"}, 0, False, ["array"]],
182+
[{"obj": "etc"}, 0, False, ["array"]],
183183
ids=["LKJ0", "LKJ1", "LKJ2", "LKJ3"],
184184
)
185185
async def test_lkj_(http_client, invalid):
@@ -222,7 +222,7 @@ async def test_13ee(http_client):
222222

223223
@pytest.mark.parametrize(
224224
"invalid",
225-
[{"obj": "ect"}, 0, False, ["array"]],
225+
[{"obj": "etc"}, 0, False, ["array"]],
226226
ids=["6C00", "6C01", "6C02", "6C03"],
227227
)
228228
async def test_6c0_(http_client, invalid):

src/tests/websockets/test_graphql_transport_ws.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ async def test_duplicated_operation_ids(ws: WebSocketClient):
422422

423423

424424
async def test_reused_operation_ids(ws: WebSocketClient):
425-
"""Test that an operation id can be re-used after it has been
426-
previously used for a completed operation.
425+
"""Test that an operation id can be reused after it has been
426+
previously used for a completed operation.
427427
"""
428428
# Use sub1 as an id for an operation
429429
await ws.send_message(
@@ -1126,7 +1126,7 @@ def on_init(_handler):
11261126
assert connection_ack_message == {"type": "connection_ack"}
11271127
await ws.close()
11281128

1129-
# the error hander should have been called
1129+
# the error handler should have been called
11301130
assert handler
11311131
errorhandler.assert_called_once()
11321132
args = errorhandler.call_args

src/tests/websockets/test_graphql_ws.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ async def test_sends_keep_alive(http_client_class: type[HttpClient]):
311311
ack_message: ConnectionAckMessage = await ws.receive_json()
312312
assert ack_message["type"] == "connection_ack"
313313

314-
# we can't be sure how many keep-alives exactly we
315-
# get but they should be more than one.
314+
# We can't be sure how many keep-alive messages exactly we
315+
# get, but there should be more than one.
316316
keepalive_count = 0
317317
while True:
318318
ka_or_data_message: Union[

0 commit comments

Comments
 (0)