Skip to content

Commit 7ea5dc0

Browse files
committed
docs: fix miscellaneous typos
Spotted in passing while reading the codebase. Includes: - "slecting" -> "selecting" (geometry.py docstring) - "suprisingly" -> "surprisingly" (visual.py comment) - "dependant" -> "dependent" (visual.py, content.py, CSS.md, widgets.md, app.md) - "an an app" -> "in an app" (content.py docstring) - "wih" -> "with" (toast.md) - "ot" -> "of" (styles.md) - "wont" -> "won't" (reactivity.md, two occurrences) - "progess" -> "progress" (progress_bar_isolated.py docstring)
1 parent a066560 commit 7ea5dc0

10 files changed

Lines changed: 13 additions & 13 deletions

File tree

docs/examples/widgets/progress_bar_isolated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def compose(self) -> ComposeResult:
1717
yield Footer()
1818

1919
def on_mount(self) -> None:
20-
"""Set up a timer to simulate progess happening."""
20+
"""Set up a timer to simulate progress happening."""
2121
self.progress_timer = self.set_interval(1 / 10, self.make_progress, pause=True)
2222

2323
def make_progress(self) -> None:

docs/guide/CSS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ Unlike the `id` attribute, a widget's classes can be changed after the widget wa
297297
- [remove_class()][textual.dom.DOMNode.remove_class] Removes class name(s) from a widget.
298298
- [toggle_class()][textual.dom.DOMNode.toggle_class] Removes a class name if it is present, or adds the name if it's not already present.
299299
- [has_class()][textual.dom.DOMNode.has_class] Checks if one or more classes are set on a widget.
300-
- [set_class()][textual.css.query.DOMQuery.set_class] Sets or removes a class dependant on a boolean.
300+
- [set_class()][textual.css.query.DOMQuery.set_class] Sets or removes a class dependent on a boolean.
301301
- [classes][textual.dom.DOMNode.classes] Is a frozen set of the class(es) set on a widget.
302302

303303

docs/guide/app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ When you exit a Textual app with [`App.exit()`][textual.app.App.exit], you can o
230230
Returns codes are a standard feature provided by your operating system.
231231
When any application exits it can return an integer to indicate if it was successful or not.
232232
A return code of `0` indicates success, any other value indicates that an error occurred.
233-
The exact meaning of a non-zero return code is application-dependant.
233+
The exact meaning of a non-zero return code is application-dependent.
234234

235235
When a Textual app exits normally, the return code will be `0`. If there is an unhandled exception, Textual will set a return code of `1`.
236236
You may want to set a different value for the return code if there is error condition that you want to differentiate from an unhandled exception.

docs/guide/reactivity.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ The `Name` widget has a reactive `who` attribute. When the app modifies that att
9494

9595
!!! information
9696

97-
Textual will check if a value has really changed, so assigning the same value wont prompt an unnecessary refresh.
97+
Textual will check if a value has really changed, so assigning the same value won't prompt an unnecessary refresh.
9898

9999
### Disabling refresh
100100

@@ -107,7 +107,7 @@ class MyWidget(Widget):
107107
count = var(0) # (1)!
108108
```
109109

110-
1. Changing `self.count` wont cause a refresh or layout.
110+
1. Changing `self.count` won't cause a refresh or layout.
111111

112112
### Layout
113113

docs/guide/styles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Let's look at an example. We will create two widgets, one with a height of `"2fr
198198
```
199199

200200
The total `fr` units for height is 3.
201-
The first widget has a height ot `2fr`, which results in the height being two thirds of the total height.
201+
The first widget has a height of `2fr`, which results in the height being two thirds of the total height.
202202
The second widget has a height of `1fr` which makes it take up the remaining third of the height.
203203
Here's what that looks like.
204204

docs/guide/widgets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ The `InputWithLabel` class bundles an [Input](../widgets/input.md) with a [Label
612612
## Coordinating widgets
613613

614614
Widgets rarely exist in isolation, and often need to communicate or exchange data with other parts of your app.
615-
This is not difficult to do, but there is a risk that widgets can become dependant on each other, making it impossible to reuse a widget without copying a lot of dependant code.
615+
This is not difficult to do, but there is a risk that widgets can become dependent on each other, making it impossible to reuse a widget without copying a lot of dependent code.
616616

617617
In this section we will show how to design and build a fully-working app, while keeping widgets reusable.
618618

docs/widgets/toast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Toast.-error {
5454
}
5555
```
5656

57-
You can customize just the title wih the `toast--title` class.
57+
You can customize just the title with the `toast--title` class.
5858
The following would make the title italic for an information toast:
5959

6060
```scss

src/textual/content.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def is_same(self, content: Content) -> bool:
558558
def get_optimal_width(self, rules: RulesMap, container_width: int) -> int:
559559
"""Get optimal width of the Visual to display its content.
560560
561-
The exact definition of "optimal width" is dependant on the Visual, but
561+
The exact definition of "optimal width" is dependent on the Visual, but
562562
will typically be wide enough to display output without cropping or wrapping,
563563
and without superfluous space.
564564
@@ -1721,7 +1721,7 @@ def highlight_regex(
17211721
class _FormattedLine:
17221722
"""A line of content with additional formatting information.
17231723
1724-
This class is used internally within Content, and you are unlikely to need it an an app.
1724+
This class is used internally within Content, and you are unlikely to need it in an app.
17251725
"""
17261726

17271727
def __init__(

src/textual/geometry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ def grow_maximum(self, other: Spacing) -> Spacing:
13211321
class Shape:
13221322
"""An arbitrary shape defined by a sequence of regions.
13231323
1324-
This class currently exists to filter widgets within a shape defined when the user is slecting text.
1324+
This class currently exists to filter widgets within a shape defined when the user is selecting text.
13251325
13261326
"""
13271327

src/textual/visual.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def render_strips(
147147
def get_optimal_width(self, rules: RulesMap, container_width: int) -> int:
148148
"""Get optimal width of the Visual to display its content.
149149
150-
The exact definition of "optimal width" is dependant on the Visual, but
150+
The exact definition of "optimal width" is dependent on the Visual, but
151151
will typically be wide enough to display output without cropping or wrapping,
152152
and without superfluous space.
153153
@@ -236,7 +236,7 @@ def to_strips(
236236
),
237237
)
238238
if widget.auto_links and not widget.is_container:
239-
# TODO: This is suprisingly expensive (why?)
239+
# TODO: This is surprisingly expensive (why?)
240240
link_style = widget.link_style
241241
strips = [strip._apply_link_style(link_style) for strip in strips]
242242

0 commit comments

Comments
 (0)