Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Fix inability to copy text outside of an input/textarea when it was focused https://github.com/Textualize/textual/pull/6148
- Fix issue when copying text after a double click https://github.com/Textualize/textual/pull/6148
- Fixed type hint aliasing for App under TYPE_CHECKING https://github.com/Textualize/textual/pull/6152

## [6.2.0] - 2025-09-30

Expand Down
6 changes: 3 additions & 3 deletions src/textual/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
if TYPE_CHECKING:
from importlib.metadata import version

from textual.app import App
from textual.app import App as _App

__version__ = version("textual")
"""The version of Textual."""
Expand Down Expand Up @@ -65,15 +65,15 @@ def __init__(
log_callable: LogCallable | None,
group: LogGroup = LogGroup.INFO,
verbosity: LogVerbosity = LogVerbosity.NORMAL,
app: App | None = None,
app: _App | None = None,
) -> None:
self._log = log_callable
self._group = group
self._verbosity = verbosity
self._app = None if app is None else weakref.ref(app)

@property
def app(self) -> App | None:
def app(self) -> _App | None:
"""The associated application, or `None` if there isn't one."""
return None if self._app is None else self._app()

Expand Down