Skip to content

Commit dcc24ea

Browse files
committed
docs: fix 'into' grammar
1 parent 6bc9501 commit dcc24ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+70
-70
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ In addition to serving your apps locally, you can serve apps with [Textual Web](
199199

200200
Textual Web's firewall-busting technology can serve an unlimited number of applications.
201201

202-
Since Textual apps have low system requirements, you can install them anywhere Python also runs. Turning any device in to a connected device.
202+
Since Textual apps have low system requirements, you can install them anywhere Python also runs. Turning any device into a connected device.
203203
No desktop required!
204204

205205

docs/examples/guide/widgets/checker04.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def get_square_region(square_offset: Offset) -> Region:
5252
"""Get region relative to widget from square coordinate."""
5353
x, y = square_offset
5454
region = Region(x * 8, y * 4, 8, 4)
55-
# Move the region in to the widgets frame of reference
55+
# Move the region into the widgets frame of reference
5656
region = region.translate(-self.scroll_offset)
5757
return region
5858

docs/guide/app.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# App Basics
22

3-
In this chapter we will cover how to use Textual's App class to create an application. Just enough to get you up to speed. We will go in to more detail in the following chapters.
3+
In this chapter we will cover how to use Textual's App class to create an application. Just enough to get you up to speed. We will go into more detail in the following chapters.
44

55
## The App class
66

@@ -30,7 +30,7 @@ If we run this app with `python simple02.py` you will see a blank terminal, some
3030
```{.textual path="docs/examples/app/simple02.py"}
3131
```
3232

33-
When you call [App.run()][textual.app.App.run] Textual puts the terminal in to a special state called *application mode*. When in application mode the terminal will no longer echo what you type. Textual will take over responding to user input (keyboard and mouse) and will update the visible portion of the terminal (i.e. the *screen*).
33+
When you call [App.run()][textual.app.App.run] Textual puts the terminal into a special state called *application mode*. When in application mode the terminal will no longer echo what you type. Textual will take over responding to user input (keyboard and mouse) and will update the visible portion of the terminal (i.e. the *screen*).
3434

3535
If you hit ++ctrl+q++ Textual will exit application mode and return you to the command prompt. Any content you had in the terminal prior to application mode will be restored.
3636

@@ -42,7 +42,7 @@ If you hit ++ctrl+q++ Textual will exit application mode and return you to the c
4242

4343
!!! tip "Added in version 0.55.0"
4444

45-
You can also run apps in _inline_ mode, which will cause the app to appear beneath the prompt (and won't go in to application mode).
45+
You can also run apps in _inline_ mode, which will cause the app to appear beneath the prompt (and won't go into application mode).
4646
Inline apps are useful for tools that integrate closely with the typical workflow of a terminal.
4747

4848
To run an app in inline mode set the `inline` parameter to `True` when you call [App.run()][textual.app.App.run]. See [Style Inline Apps](../how-to/style-inline-apps.md) for how to apply additional styles to inline apps.

docs/guide/devtools.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ textual run -c textual colors
6262
## Serve
6363

6464
The devtools can also serve your application in a browser.
65-
Effectively turning your terminal app in to a web application!
65+
Effectively turning your terminal app into a web application!
6666

6767
The `serve` sub-command is similar to `run`. Here's how you can serve an app launched from a Python file:
6868

@@ -144,7 +144,7 @@ textual console -v
144144

145145
### Decreasing verbosity
146146

147-
Log messages are classififed in to groups, and the `-x` flag can be used to **exclude** all message from a group. The groups are: `EVENT`, `DEBUG`, `INFO`, `WARNING`, `ERROR`, `PRINT`, `SYSTEM`, `LOGGING` and `WORKER`. The group a message belongs to is printed after its timestamp.
147+
Log messages are classififed into groups, and the `-x` flag can be used to **exclude** all message from a group. The groups are: `EVENT`, `DEBUG`, `INFO`, `WARNING`, `ERROR`, `PRINT`, `SYSTEM`, `LOGGING` and `WORKER`. The group a message belongs to is printed after its timestamp.
148148

149149
Multiple groups may be excluded, for example to exclude everything except warning, errors, and `print` statements:
150150

docs/guide/events.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This processing of messages is done within an asyncio Task which is started when
2020

2121
The FastAPI docs have an [excellent introduction](https://fastapi.tiangolo.com/async/) to Python async programming.
2222

23-
By way of an example, let's consider what happens if you were to type "Text" in to a `Input` widget. When you hit the ++t++ key, Textual creates a [key][textual.events.Key] event and sends it to the widget's message queue. Ditto for ++e++, ++x++, and ++t++.
23+
By way of an example, let's consider what happens if you were to type "Text" into a `Input` widget. When you hit the ++t++ key, Textual creates a [key][textual.events.Key] event and sends it to the widget's message queue. Ditto for ++e++, ++x++, and ++t++.
2424

2525
The widget's task will pick the first message from the queue (a key event for the ++t++ key) and call the `on_key` method with the event as the first argument. In other words it will call `Input.on_key(event)`, which updates the display to show the new letter.
2626

@@ -334,4 +334,4 @@ Let's look at an example which looks up word definitions from an [api](https://d
334334
```{.textual path="docs/examples/events/dictionary.py"}
335335
```
336336

337-
Note the highlighted line in the above code which calls `asyncio.create_task` to run a coroutine in the background. Without this you would find typing in to the text box to be unresponsive.
337+
Note the highlighted line in the above code which calls `asyncio.create_task` to run a coroutine in the background. Without this you would find typing into the text box to be unresponsive.

docs/guide/input.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ The following example shows how focus works in practice.
105105
```{.textual path="docs/examples/guide/input/key03.py", press="H,e,l,l,o,tab,W,o,r,l,d,!"}
106106
```
107107

108-
The app splits the screen in to quarters, with a `RichLog` widget in each quarter. If you click any of the text logs, you should see that it is highlighted to show that the widget has focus. Key events will be sent to the focused widget only.
108+
The app splits the screen into quarters, with a `RichLog` widget in each quarter. If you click any of the text logs, you should see that it is highlighted to show that the widget has focus. Key events will be sent to the focused widget only.
109109

110110
!!! tip
111111

@@ -255,4 +255,4 @@ Most mice have a scroll wheel which you can use to scroll the window underneath
255255

256256
!!! information
257257

258-
Terminal emulators will typically convert trackpad gestures in to scroll events.
258+
Terminal emulators will typically convert trackpad gestures into scroll events.

docs/guide/reactivity.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The following example modifies "refresh01.py" so that the greeting has an automa
134134
```{.textual path="docs/examples/guide/reactivity/refresh02.py" press="n,a,m,e"}
135135
```
136136

137-
If you type in to the input now, the greeting will expand to fit the content. If you were to set `layout=False` on the reactive attribute, you should see that the box remains the same size when you type.
137+
If you type into the input now, the greeting will expand to fit the content. If you were to set `layout=False` on the reactive attribute, you should see that the box remains the same size when you type.
138138

139139
## Validation
140140

@@ -171,7 +171,7 @@ Watch method names begin with `watch_` followed by the name of the attribute, an
171171
If the method accepts a single argument, it will be called with the new assigned value.
172172
If the method accepts *two* positional arguments, it will be called with both the *old* value and the *new* value.
173173

174-
The following app will display any color you type in to the input. Try it with a valid color in Textual CSS. For example `"darkorchid"` or `"#52de44"`.
174+
The following app will display any color you type into the input. Try it with a valid color in Textual CSS. For example `"darkorchid"` or `"#52de44"`.
175175

176176
=== "watch01.py"
177177

@@ -311,15 +311,15 @@ Compute methods are the final superpower offered by the `reactive` descriptor. T
311311

312312
You could be forgiven in thinking this sounds a lot like Python's property decorator. The difference is that Textual will cache the value of compute methods, and update them when any other reactive attribute changes.
313313

314-
The following example uses a computed attribute. It displays three inputs for each color component (red, green, and blue). If you enter numbers in to these inputs, the background color of another widget changes.
314+
The following example uses a computed attribute. It displays three inputs for each color component (red, green, and blue). If you enter numbers into these inputs, the background color of another widget changes.
315315

316316
=== "computed01.py"
317317

318318
```python hl_lines="25-26 28-29"
319319
--8<-- "docs/examples/guide/reactivity/computed01.py"
320320
```
321321

322-
1. Combines color components in to a Color object.
322+
1. Combines color components into a Color object.
323323
2. The watch method is called when the _result_ of `compute_color` changes.
324324

325325
=== "computed01.tcss"

docs/guide/testing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Knowing which test has failed will help you quickly track down where your code w
9191
## Simulating key presses
9292

9393
We've seen how the [`press`][textual.pilot.Pilot] method simulates keys.
94-
You can also supply multiple keys to simulate the user typing in to the app.
94+
You can also supply multiple keys to simulate the user typing into the app.
9595
Here's an example of simulating the user typing the word "hello".
9696

9797
```python

docs/guide/widgets.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ Textual will call this method as required to get content for every row of charac
407407
--8<-- "docs/images/render_line.excalidraw.svg"
408408
</div>
409409

410-
Let's look at an example before we go in to the details. The following Textual app implements a widget with the line API that renders a checkerboard pattern. This might form the basis of a chess / checkers game. Here's the code:
410+
Let's look at an example before we go into the details. The following Textual app implements a widget with the line API that renders a checkerboard pattern. This might form the basis of a chess / checkers game. Here's the code:
411411

412412
=== "checker01.py"
413413

docs/tutorial.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ Here's what the above app defines:
157157
--8<-- "docs/examples/tutorial/stopwatch01.py"
158158
```
159159

160-
The final three lines create an instance of the app and calls the [run()][textual.app.App.run] method which puts your terminal in to *application mode* and runs the app until you exit with ++ctrl+q++. This happens within a `__name__ == "__main__"` block so we could run the app with `python stopwatch01.py` or import it as part of a larger project.
160+
The final three lines create an instance of the app and calls the [run()][textual.app.App.run] method which puts your terminal into *application mode* and runs the app until you exit with ++ctrl+q++. This happens within a `__name__ == "__main__"` block so we could run the app with `python stopwatch01.py` or import it as part of a larger project.
161161

162162
## Designing a UI with widgets
163163

164164
Textual has a large number of [builtin widgets](./widget_gallery.md).
165165
For our app we will need new widgets, which we can create by extending and combining the builtin widgets.
166166

167-
Before we dive in to building widgets, let's first sketch a design for the app &mdash; so we know what we're aiming for.
167+
Before we dive into building widgets, let's first sketch a design for the app &mdash; so we know what we're aiming for.
168168

169169

170170
<div class="excalidraw">

docs/widgets/select.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A Select widget is a compact control to allow the user to select between a numbe
99
- [ ] Container
1010

1111

12-
The options in a select control may be passed in to the constructor or set later with [set_options][textual.widgets.Select.set_options].
12+
The options in a select control may be passed into the constructor or set later with [set_options][textual.widgets.Select.set_options].
1313
Options should be given as a sequence of tuples consisting of two values: the first is the string (or [Rich Renderable](https://rich.readthedocs.io/en/latest/protocol.html)) to display in the control and list of options, the second is the value of option.
1414

1515
The value of the currently selected option is stored in the `value` attribute of the widget, and the `value` attribute of the [Changed][textual.widgets.Select.Changed] message.

examples/dictionary.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async def lookup_word(self, word: str) -> None:
4848
self.query_one("#results", Markdown).update(markdown)
4949

5050
def make_word_markdown(self, results: object) -> str:
51-
"""Convert the results in to markdown."""
51+
"""Convert the results into markdown."""
5252
lines = []
5353
if isinstance(results, dict):
5454
lines.append(f"# {results['title']}")

examples/example.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This is H3 Content
1212

1313
#### This is H4
1414

15-
Header level 4 content. Drilling down in to finer headings.
15+
Header level 4 content. Drilling down into finer headings.
1616

1717
##### This is H5
1818

@@ -85,7 +85,7 @@ In the future I think we could add controls to export the code, copy to the clip
8585
```python
8686
@lru_cache(maxsize=1024)
8787
def split(self, cut_x: int, cut_y: int) -> tuple[Region, Region, Region, Region]:
88-
"""Split a region in to 4 from given x and y offsets (cuts).
88+
"""Split a region into 4 from given x and y offsets (cuts).
8989
9090
```
9191
cut_x ↓

src/textual/_arrange.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def arrange(
6161
layers = _build_layers(display_widgets)
6262

6363
for widgets in layers.values():
64-
# Partition widgets in to split widgets and non-split widgets
64+
# Partition widgets into split widgets and non-split widgets
6565
non_split_widgets, split_widgets = partition(get_split, widgets)
6666
if split_widgets:
6767
_split_placements, dock_region = _arrange_split_widgets(

src/textual/_binary_encode.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DecodeError(Exception):
2626

2727

2828
def dump(data: object) -> bytes:
29-
"""Encodes a data structure in to bytes.
29+
"""Encodes a data structure into bytes.
3030
3131
Args:
3232
data: Data structure

src/textual/_compositor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
3-
The compositor handles combining widgets in to a single screen (i.e. compositing).
3+
The compositor handles combining widgets into a single screen (i.e. compositing).
44
55
It also stores the results of that process, so that Textual knows the widgets on
66
the screen and their locations. The compositor uses this information to answer

src/textual/_partition.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
def partition(
99
predicate: Callable[[T], object], iterable: Iterable[T]
1010
) -> tuple[list[T], list[T]]:
11-
"""Partition a sequence in to two list from a given predicate. The first list will contain
11+
"""Partition a sequence into two list from a given predicate. The first list will contain
1212
the values where the predicate is False, the second list will contain the remaining values.
1313
1414
Args:

src/textual/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2845,7 +2845,7 @@ def set_focus(self, widget: Widget | None, scroll_visible: bool = True) -> None:
28452845
28462846
Args:
28472847
widget: Widget to focus.
2848-
scroll_visible: Scroll widget in to view.
2848+
scroll_visible: Scroll widget into view.
28492849
"""
28502850
self.screen.set_focus(widget, scroll_visible)
28512851

src/textual/binding.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Binding:
8585
"""Make this binding a system binding, which removes it from the key panel."""
8686

8787
def parse_key(self) -> tuple[list[str], str]:
88-
"""Parse a key in to a list of modifiers, and the actual key.
88+
"""Parse a key into a list of modifiers, and the actual key.
8989
9090
Returns:
9191
A tuple of (MODIFIER LIST, KEY).

src/textual/color.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ class Lab(NamedTuple):
110110
re.VERBOSE,
111111
)
112112

113-
# Fast way to split a string of 6 characters in to 3 pairs of 2 characters
113+
# Fast way to split a string of 6 characters into 3 pairs of 2 characters
114114
_split_pairs3: Callable[[str], tuple[str, str, str]] = itemgetter(
115115
slice(0, 2), slice(2, 4), slice(4, 6)
116116
)
117-
# Fast way to split a string of 8 characters in to 4 pairs of 2 characters
117+
# Fast way to split a string of 8 characters into 4 pairs of 2 characters
118118
_split_pairs4: Callable[[str], tuple[str, str, str, str]] = itemgetter(
119119
slice(0, 2), slice(2, 4), slice(4, 6), slice(6, 8)
120120
)

src/textual/content.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def get_style_at_offset(self, offset: int) -> Style:
475475
"""Get the style of a character at give offset.
476476
477477
Args:
478-
offset (int): Offset in to text (negative indexing supported)
478+
offset (int): Offset into text (negative indexing supported)
479479
480480
Returns:
481481
Style: A Style instance.
@@ -828,7 +828,7 @@ def split(
828828
include_separator: bool = False,
829829
allow_blank: bool = False,
830830
) -> list[Content]:
831-
"""Split rich text in to lines, preserving styles.
831+
"""Split rich text into lines, preserving styles.
832832
833833
Args:
834834
separator (str, optional): String to split on. Defaults to "\\\\n".

src/textual/css/_style_properties.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ def __set__(self, obj: StylesBase, value: float | str | None) -> None:
11721172

11731173

11741174
class AlignProperty:
1175-
"""Combines the horizontal and vertical alignment properties in to a single property."""
1175+
"""Combines the horizontal and vertical alignment properties into a single property."""
11761176

11771177
def __set_name__(self, owner: StylesBase, name: str) -> None:
11781178
self.horizontal = f"{name}_horizontal"

src/textual/css/scalar.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def from_number(cls, value: float) -> Scalar:
242242
@classmethod
243243
@lru_cache(maxsize=1024)
244244
def parse(cls, token: str, percent_unit: Unit = Unit.WIDTH) -> Scalar:
245-
"""Parse a string in to a Scalar
245+
"""Parse a string into a Scalar
246246
247247
Args:
248248
token: A string containing a scalar, e.g. "3.14fr"
@@ -267,7 +267,7 @@ def parse(cls, token: str, percent_unit: Unit = Unit.WIDTH) -> Scalar:
267267
def resolve(
268268
self, size: Size, viewport: Size, fraction_unit: Fraction | None = None
269269
) -> Fraction:
270-
"""Resolve scalar with units in to a dimensions.
270+
"""Resolve scalar with units into a dimensions.
271271
272272
Args:
273273
size: Size of the container.
@@ -348,7 +348,7 @@ def __rich_repr__(self) -> rich.repr.Result:
348348
yield None, str(self.y)
349349

350350
def resolve(self, size: Size, viewport: Size) -> Offset:
351-
"""Resolve the offset in to cells.
351+
"""Resolve the offset into cells.
352352
353353
Args:
354354
size: Size of container.

src/textual/css/styles.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def merge(self, other: StylesBase) -> None:
660660
"""
661661

662662
def merge_rules(self, rules: RulesMap) -> None:
663-
"""Merge rules in to Styles.
663+
"""Merge rules into Styles.
664664
665665
Args:
666666
rules: A mapping of rules.

src/textual/demo/widgets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class ListViews(containers.VerticalGroup):
255255
LISTS_MD = """\
256256
## List Views and Option Lists
257257
258-
A List View turns any widget in to a user-navigable and selectable list.
258+
A List View turns any widget into a user-navigable and selectable list.
259259
An Option List for a field to present a list of strings to select from.
260260
261261
"""

src/textual/drivers/linux_driver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def on_terminal_resize(signum, stack) -> None:
291291
def _request_terminal_sync_mode_support(self) -> None:
292292
"""Writes an escape sequence to query the terminal support for the sync protocol."""
293293
# Terminals should ignore this sequence if not supported.
294-
# Apple terminal doesn't, and writes a single 'p' in to the terminal,
294+
# Apple terminal doesn't, and writes a single 'p' into the terminal,
295295
# so we will make a special case for Apple terminal (which doesn't support sync anyway).
296296
if not self.input_tty:
297297
return

src/textual/drivers/linux_inline_driver.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def on_terminal_resize(signum, stack) -> None:
246246
def _request_terminal_sync_mode_support(self) -> None:
247247
"""Writes an escape sequence to query the terminal support for the sync protocol."""
248248
# Terminals should ignore this sequence if not supported.
249-
# Apple terminal doesn't, and writes a single 'p' in to the terminal,
249+
# Apple terminal doesn't, and writes a single 'p' into the terminal,
250250
# so we will make a special case for Apple terminal (which doesn't support sync anyway).
251251
if os.environ.get("TERM_PROGRAM", "") != "Apple_Terminal":
252252
self.write("\033[?2026$p")

0 commit comments

Comments
 (0)