Skip to content

Commit

Permalink
example in docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Sep 20, 2024
1 parent 0687c53 commit 52fff84
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/textual/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2287,6 +2287,11 @@ def get_screen(
) -> Screen:
"""Get an installed screen.
Example:
```python
my_screen = self.get_screen("settings", MyScreen)
```
Args:
screen: Either a Screen object or screen name (the `name` argument when installed).
screen_class: Class of expected screen, or `None` for any screen class.
Expand Down

0 comments on commit 52fff84

Please sign in to comment.