Skip to content

Commit 9c12a45

Browse files
committed
Fix typos discovered by codespell
1 parent 8a15b19 commit 9c12a45

File tree

10 files changed

+22
-12
lines changed

10 files changed

+22
-12
lines changed

.github/workflows/codespell.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: codespell
2+
on: [pull_request, push]
3+
jobs:
4+
codespell:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- run: python3 -m pip install codespell
9+
- run: codespell --ignore-words-list="ba,fo,hel,revered,womens"
10+
--skip="./README.de.md,./README.es.md,./README.sv.md,*.svg"

docs/source/console.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ Paging
284284

285285
If you have some long output to present to the user you can use a *pager* to display it. A pager is typically an application on your operating system which will at least support pressing a key to scroll, but will often support scrolling up and down through the text and other features.
286286

287-
You can page output from a Console by calling :meth:`~rich.console.Console.pager` which returns a context manger. When the pager exits, anything that was printed will be sent to the pager. Here's an example::
287+
You can page output from a Console by calling :meth:`~rich.console.Console.pager` which returns a context manager. When the pager exits, anything that was printed will be sent to the pager. Here's an example::
288288

289289
from rich.__main__ import make_test_card
290290
from rich.console import Console

docs/source/progress.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ If the :class:`~rich.progress.Progress` class doesn't offer exactly what you nee
192192
Multiple Progress
193193
-----------------
194194

195-
You can't have different columns per task with a single Progress instance. However, you can have as many Progress instance as you like in a :ref:`live`. See `live_progress.py <https://github.com/willmcgugan/rich/blob/master/examples/live_progress.py>`_ for an example of using mutiple Progress instances.
195+
You can't have different columns per task with a single Progress instance. However, you can have as many Progress instance as you like in a :ref:`live`. See `live_progress.py <https://github.com/willmcgugan/rich/blob/master/examples/live_progress.py>`_ for an example of using multiple Progress instances.
196196

197197
Example
198198
-------

rich/color_triplet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def rgb(self) -> str:
2929

3030
@property
3131
def normalized(self) -> Tuple[float, float, float]:
32-
"""Covert components in to floats between 0 and 1.
32+
"""Convert components into floats between 0 and 1.
3333
3434
Returns:
3535
Tuple[float, float, float]: A tuple of three normalized colour components.

rich/pretty.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def iter_attrs() -> Iterable[
589589
and not isinstance(obj, type)
590590
and (
591591
"__create_fn__" in obj.__repr__.__qualname__ or py_version == (3, 6)
592-
) # Check if __repr__ wasn't overriden
592+
) # Check if __repr__ wasn't overridden
593593
):
594594
obj_id = id(obj)
595595
if obj_id in visited_ids:

rich/progress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ class Task:
473473
"""Optional[float]: Time this task was stopped, or None if not stopped."""
474474

475475
finished_speed: Optional[float] = None
476-
"""Optional[float]: The last speed for a finshed task."""
476+
"""Optional[float]: The last speed for a finished task."""
477477

478478
_progress: Deque[ProgressSample] = field(
479479
default_factory=deque, init=False, repr=False

rich/syntax.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def get_background_style(self) -> Style:
115115

116116

117117
class PygmentsSyntaxTheme(SyntaxTheme):
118-
"""Syntax theme that delagates to Pygments theme."""
118+
"""Syntax theme that delegates to Pygments theme."""
119119

120120
def __init__(self, theme: Union[str, Type[PygmentsStyle]]) -> None:
121121
self._style_cache: Dict[TokenType, Style] = {}
@@ -679,7 +679,7 @@ def __rich_console__(
679679
"--background-color",
680680
dest="background_color",
681681
default=None,
682-
help="Overide background color",
682+
help="Override background color",
683683
)
684684
parser.add_argument(
685685
"-x",

rich/traceback.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ def ipy_display_traceback(
133133
# if wihin ipython, use customized traceback
134134
ip = get_ipython() # type: ignore
135135
ipy_excepthook_closure(ip)
136-
return sys.excepthook # type: ignore # more strict signature that mypy cant interpret
136+
return sys.excepthook # type: ignore # more strict signature that mypy can't interpret
137137
except Exception:
138138
# otherwise use default system hook
139139
old_excepthook = sys.excepthook
140140
sys.excepthook = excepthook
141-
return old_excepthook # type: ignore # more strict signature that mypy cant interpret
141+
return old_excepthook # type: ignore # more strict signature that mypy can't interpret
142142

143143

144144
@dataclass

tests/test_progress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def test_reset() -> None:
407407

408408

409409
def test_progress_max_refresh() -> None:
410-
"""Test max_refresh argment."""
410+
"""Test max_refresh argument."""
411411
time = 0.0
412412

413413
def get_time() -> float:

tools/cats.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
},
241241
{
242242
"_id": "5955792c7b77520020799431",
243-
"text": "Cats \"knead\" because of seperation from their mothers",
243+
"text": "Cats \"knead\" because of separation from their mothers",
244244
"type": "cat",
245245
"user": {
246246
"_id": "595579027b77520020799430",
@@ -3202,7 +3202,7 @@
32023202
{
32033203
"_id": "5d38bcc00f1c57001592f153",
32043204
"type": "cat",
3205-
"text": "The irresistable and cuddly Ragamuffin is the result of crossbreeding Ragdoll cats with Persians, Himalayans, and other larger longhaired breeds.",
3205+
"text": "The irresistible and cuddly Ragamuffin is the result of crossbreeding Ragdoll cats with Persians, Himalayans, and other larger longhaired breeds.",
32063206
"user": {
32073207
"_id": "5a9ac18c7478810ea6c06381",
32083208
"name": {

0 commit comments

Comments
 (0)