From 6910680877ccf0680ff8ec746b9ca9bd57a91ff7 Mon Sep 17 00:00:00 2001 From: Calum Young Date: Sun, 4 Sep 2022 10:58:02 +0100 Subject: [PATCH] Fix typos --- rich/ansi.py | 2 +- rich/filesize.py | 2 +- rich/traceback.py | 2 +- tests/test_tree.py | 2 +- tools/cats.json | 10 +++++----- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/rich/ansi.py b/rich/ansi.py index d4c32cef1..92ef51941 100644 --- a/rich/ansi.py +++ b/rich/ansi.py @@ -120,7 +120,7 @@ def __init__(self) -> None: self.style = Style.null() def decode(self, terminal_text: str) -> Iterable[Text]: - """Decode ANSI codes in an interable of lines. + """Decode ANSI codes in an iterable of lines. Args: lines (Iterable[str]): An iterable of lines of terminal output. diff --git a/rich/filesize.py b/rich/filesize.py index 61be47510..99f118e20 100644 --- a/rich/filesize.py +++ b/rich/filesize.py @@ -2,7 +2,7 @@ """Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2 The functions declared in this module should cover the different -usecases needed to generate a string representation of a file size +use cases needed to generate a string representation of a file size using several different units. Since there are many standards regarding file size units, three different functions have been implemented. diff --git a/rich/traceback.py b/rich/traceback.py index 55acaf070..52fe831f3 100644 --- a/rich/traceback.py +++ b/rich/traceback.py @@ -337,7 +337,7 @@ def extract( from rich import _IMPORT_CWD def safe_str(_object: Any) -> str: - """Don't allow exceptions from __str__ to propegate.""" + """Don't allow exceptions from __str__ to propagate.""" try: return str(_object) except Exception: diff --git a/tests/test_tree.py b/tests/test_tree.py index c8465a97a..143efb1bc 100644 --- a/tests/test_tree.py +++ b/tests/test_tree.py @@ -139,7 +139,7 @@ def test_render_tree_hide_root_win32(): def test_tree_measure(): tree = Tree("foo") tree.add("bar") - tree.add("musroom risotto") + tree.add("mushroom risotto") console = Console() measurement = Measurement.get(console, console.options, tree) assert measurement == Measurement(11, 19) diff --git a/tools/cats.json b/tools/cats.json index 05beeda4f..f4ca7bcb1 100644 --- a/tools/cats.json +++ b/tools/cats.json @@ -1500,7 +1500,7 @@ }, { "_id": "5b1b455f841d9700146158db", - "text": "The Egyptian Mau breed was saved from extinciton when Russian princess Natalie Trubetskaya was given a Mau that was imported from the Middle East. When she emigrated to New York City in 1956, she brought along three Mau cats. She used these kitties to establish the Fatima Egyptian Mau cattery, which produced many of the ancestors of today’s Egyptian Maus in America.", + "text": "The Egyptian Mau breed was saved from extinction when Russian princess Natalie Trubetskaya was given a Mau that was imported from the Middle East. When she emigrated to New York City in 1956, she brought along three Mau cats. She used these kitties to establish the Fatima Egyptian Mau cattery, which produced many of the ancestors of today’s Egyptian Maus in America.", "type": "cat", "user": { "_id": "5a9ac18c7478810ea6c06381", @@ -2193,7 +2193,7 @@ }, { "_id": "5c609758e54902001453302c", - "text": "According to the American Society for the Prevention of Cruelty of Animals, newborn kittens get all the nutrition they need duing the first four weeks of life fom their mother's milk. If you are taking care of a kitten without its mother, or if the mother isn't producing enough milk, you can feed the kitten a commercial milk substitute.", + "text": "According to the American Society for the Prevention of Cruelty of Animals, newborn kittens get all the nutrition they need during the first four weeks of life fom their mother's milk. If you are taking care of a kitten without its mother, or if the mother isn't producing enough milk, you can feed the kitten a commercial milk substitute.", "type": "cat", "user": { "_id": "5a9ac18c7478810ea6c06381", @@ -2656,7 +2656,7 @@ { "_id": "5d38b2510f1c57001592f12e", "type": "cat", - "text": "Courgars are the largest wild cats that can purr.", + "text": "Cougars are the largest wild cats that can purr.", "user": { "_id": "5a9ac18c7478810ea6c06381", "name": { @@ -2768,7 +2768,7 @@ { "_id": "5e80e7cc2d4b850015003072", "type": "cat", - "text": "Cats can climb on trees faster than squirels.", + "text": "Cats can climb on trees faster than squirrels.", "user": { "_id": "5e80e6c72d4b85001500306e", "name": { @@ -3284,4 +3284,4 @@ "userUpvoted": null } ] -} \ No newline at end of file +}