Skip to content

Commit c19d54d

Browse files
Documentation fixes.
1 parent 9a9a072 commit c19d54d

File tree

12 files changed

+23
-21
lines changed

12 files changed

+23
-21
lines changed

docs/api/containers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
::: textual.containers
2+
3+
::: textual.widgets.ContentSwitcher

docs/styles/layout.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ See the [layout](../guide/layout.md) guide for more information.
2323
## Example
2424

2525
Note how the `layout` style affects the arrangement of widgets in the example below.
26-
To learn more about the grid layout, you can see the [layout guide](../guide/layout.md) or the [grid reference](./grid.md).
26+
To learn more about the grid layout, you can see the [layout guide](../guide/layout.md) or the [grid reference](../grid.md).
2727

2828
=== "Output"
2929

docs/widgets/toast.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ A widget which displays a notification message.
77
- [ ] Focusable
88
- [ ] Container
99

10-
Note that `Toast` isn't designed to be used directly in your applications,
11-
but it is instead used by [`notify`][textual.app.App.notify] to
12-
display a message when using Textual's built-in notification system.
10+
!!! warning "Note that `Toast` isn't designed to be used directly in your applications, but it is instead used by [`notify`][textual.app.App.notify] to display a message when using Textual's built-in notification system."
1311

1412
## Styling
1513

@@ -94,7 +92,7 @@ The toast widget provides the following component classes:
9492

9593
---
9694

97-
::: textual.widgets._toast
95+
::: textual.widgets._toast.Toast
9896
options:
9997
show_root_heading: true
10098
show_root_toc_entry: true

mkdocs-nav.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ nav:
165165
- "widgets/tabbed_content.md"
166166
- "widgets/tabs.md"
167167
- "widgets/text_area.md"
168+
- "widgets/toast.md"
168169
- "widgets/tree.md"
169170
- API:
170171
- "api/index.md"

src/textual/_system_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async def search(self, query: str) -> Hits:
1717
"""Handle a request to search for system commands that match the query.
1818
1919
Args:
20-
user_input: The user input to be matched.
20+
query: The user input to be matched.
2121
2222
Yields:
2323
Command hits for use in the command palette.

src/textual/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@ def validate_sub_title(self, sub_title: Any) -> str:
561561

562562
@property
563563
def workers(self) -> WorkerManager:
564-
"""The [worker](guide/workers/) manager.
564+
"""The [worker](/guide/workers/) manager.
565565
566566
Returns:
567567
An object to manage workers.
@@ -972,8 +972,8 @@ def _log(
972972
def call_from_thread(
973973
self,
974974
callback: Callable[..., CallThreadReturnType | Awaitable[CallThreadReturnType]],
975-
*args: object,
976-
**kwargs: object,
975+
*args: Any,
976+
**kwargs: Any,
977977
) -> CallThreadReturnType:
978978
"""Run a callable from another thread, and return the result.
979979

src/textual/await_complete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ def __init__(self, *coroutines: Coroutine[Any, Any, Any]) -> None:
1616
"""Create an AwaitComplete.
1717
1818
Args:
19-
coroutine: One or more coroutines to execute.
19+
coroutines: One or more coroutines to execute.
2020
"""
21-
self.coroutines = coroutines
21+
self.coroutines: tuple[Coroutine[Any, Any, Any], ...] = coroutines
2222
self._future: Future = gather(*self.coroutines)
2323

2424
async def __call__(self) -> Any:

src/textual/document/_syntax_aware_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def prepare_query(self, query: str) -> Query | None:
8080
To execute a query, call `query_syntax_tree`.
8181
8282
Args:
83-
The string query to prepare.
83+
query: The string query to prepare.
8484
8585
Returns:
8686
The prepared query.

src/textual/dom.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from inspect import getfile
1313
from typing import (
1414
TYPE_CHECKING,
15+
Any,
1516
Callable,
1617
ClassVar,
1718
Iterable,
@@ -1139,12 +1140,12 @@ def query_one(
11391140

11401141
return query.only_one() if expect_type is None else query.only_one(expect_type)
11411142

1142-
def set_styles(self, css: str | None = None, **update_styles) -> Self:
1143+
def set_styles(self, css: str | None = None, **update_styles: Any) -> Self:
11431144
"""Set custom styles on this object.
11441145
11451146
Args:
11461147
css: Styles in CSS format.
1147-
**update_styles: Keyword arguments map style names on to style.
1148+
update_styles: Keyword arguments map style names onto style values.
11481149
11491150
Returns:
11501151
Self.

src/textual/fuzzy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Fuzzy matcher.
33
4-
This class is used by the [command palette](guide/command_palette) to match search terms.
4+
This class is used by the [command palette](/guide/command_palette) to match search terms.
55
66
"""
77

0 commit comments

Comments
 (0)