Skip to content

Commit da1bdd3

Browse files
authored
Merge pull request #187 from cclauss/codespell
Fix typos discovered by codespell
2 parents 39d34c8 + cd12617 commit da1bdd3

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

.github/workflows/lint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16+
- uses: codespell-project/actions-codespell@master
17+
with:
18+
ignore_words_list: datas
19+
skip: "*.js,*.po"
1620
- name: Set up Python ${{ matrix.python-version }}
1721
uses: actions/setup-python@v1
1822
with:

pywebio/output.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
Output Messages.
168168
169169
:param contents: Message contents.
170-
The item is ``put_xxx()`` call, and any other type will be coverted to ``put_text(content)``.
170+
The item is ``put_xxx()`` call, and any other type will be converted to ``put_text(content)``.
171171
:param bool closable: Whether to show a dismiss button on the right of the message.
172172
:param int scope, position: Those arguments have the same meaning as for `put_text()`
173173
@@ -402,7 +402,7 @@ def put_info(*contents, closable=False, scope=None, position=OutputPosition.BOTT
402402
"""Output information message.
403403
404404
:param contents: Message contents.
405-
The item is ``put_xxx()`` call, and any other type will be coverted to ``put_text(content)``.
405+
The item is ``put_xxx()`` call, and any other type will be converted to ``put_text(content)``.
406406
:param bool closable: Whether to show a dismiss button on the right of the message.
407407
:param int scope, position: Those arguments have the same meaning as for `put_text()`
408408
@@ -1414,7 +1414,7 @@ def output(*contents):
14141414
and after being output, the content can also be modified by the handler (See code example below).
14151415
14161416
:param contents: The initial contents to be output.
1417-
The item is ``put_xxx()`` call, and any other type will be coverted to ``put_text(content)``.
1417+
The item is ``put_xxx()`` call, and any other type will be converted to ``put_text(content)``.
14181418
:return: An OutputHandler instance, the methods of the instance are as follows:
14191419
14201420
* ``reset(*contents)`` : Reset original contents to ``contents``

pywebio/platform/aiohttp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def _check_origin(origin, allowed_origins, host):
2323
return True
2424

2525
return any(
26-
fnmatch.fnmatch(origin, patten)
27-
for patten in allowed_origins
26+
fnmatch.fnmatch(origin, pattern)
27+
for pattern in allowed_origins
2828
)
2929

3030

pywebio/platform/httpbased.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ def get_app(context):
310310

311311
if check_origin is None:
312312
self.check_origin = lambda origin: any(
313-
fnmatch.fnmatch(origin, patten)
314-
for patten in (allowed_origins or [])
313+
fnmatch.fnmatch(origin, pattern)
314+
for pattern in (allowed_origins or [])
315315
)
316316

317317

pywebio/platform/tornado.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def _check_origin(origin, allowed_origins, handler: WebSocketHandler):
4949
return True
5050

5151
return any(
52-
fnmatch.fnmatch(origin, patten)
53-
for patten in allowed_origins
52+
fnmatch.fnmatch(origin, pattern)
53+
for pattern in allowed_origins
5454
)
5555

5656

pywebio/platform/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def make_applications(applications):
194194
elif not isinstance(applications, Mapping): # 单一任务函数 类型
195195
applications = {'index': applications}
196196

197-
# covert dict key to str
197+
# convert dict key to str
198198
applications = {str(k): v for k, v in applications.items()}
199199

200200
for app in applications.values():
@@ -215,8 +215,8 @@ def check_origin(cls, origin, allowed_origins, host):
215215
return True
216216

217217
return any(
218-
fnmatch.fnmatch(origin, patten)
219-
for patten in allowed_origins
218+
fnmatch.fnmatch(origin, pattern)
219+
for pattern in allowed_origins
220220
)
221221

222222
@staticmethod

0 commit comments

Comments
 (0)