Repository: Textualize/textual

Issue:
Event documentation doubles up the bubble and verbose checkboxes
Each of the [events](https://textual.textualize.io/events/) in the documentation have the bubble and verbose checkboxes doubled up; once early on on the page and once again later on.

In at least one case ([`Paste`](https://textual.textualize.io/events/paste/)) they don't even agree.


Discussion:
Related issue about tidying up the Event docs:

- #1702
> In at least one case ([`Paste`](https://textual.textualize.io/events/paste/)) they don't even agree.

Exhaustive list of events for which the bubble+verbose checkboxes do not agree:
-  Mount
- MouseScrollDown
- MouseScrollUp
- Paste
- Resize

Resolving patch:
diff --git a/src/textual/events.py b/src/textual/events.py
--- a/src/textual/events.py
+++ b/src/textual/events.py
@@ -110,8 +110,11 @@ def __init__(
         container_size: Size | None = None,
     ) -> None:
         self.size = size
+        """The new size of the Widget."""
         self.virtual_size = virtual_size
+        """The virtual size (scrollable size) of the Widget."""
         self.container_size = size if container_size is None else container_size
+        """The size of the Widget's container widget."""
         super().__init__()
 
     def can_replace(self, message: "Message") -> bool:
@@ -190,6 +193,7 @@ class MouseCapture(Event, bubble=False):
     def __init__(self, mouse_position: Offset) -> None:
         super().__init__()
         self.mouse_position = mouse_position
+        """The position of the mouse when captured."""
 
     def __rich_repr__(self) -> rich.repr.Result:
         yield None, self.mouse_position
@@ -209,6 +213,7 @@ class MouseRelease(Event, bubble=False):
     def __init__(self, mouse_position: Offset) -> None:
         super().__init__()
         self.mouse_position = mouse_position
+        """The position of the mouse when released."""
 
     def __rich_repr__(self) -> rich.repr.Result:
         yield None, self.mouse_position
@@ -228,8 +233,6 @@ class Key(InputEvent):
     Args:
         key: The key that was pressed.
         character: A printable character or ``None`` if it is not printable.
-    Attributes:
-        aliases: The aliases for the key, including the key itself.
     """
 
     __slots__ = ["key", "character", "aliases"]
@@ -237,10 +240,13 @@ class Key(InputEvent):
     def __init__(self, key: str, character: str | None) -> None:
         super().__init__()
         self.key = key
+        """The key that was pressed."""
         self.character = (
             (key if len(key) == 1 else None) if character is None else character
         )
+        """A printable character or ``None`` if it is not printable."""
         self.aliases: list[str] = _get_key_aliases(key)
+        """The aliases for the key, including the key itself."""
 
     def __rich_repr__(self) -> rich.repr.Result:
         yield "key", self.key
@@ -264,7 +270,7 @@ def is_printable(self) -> bool:
         """Check if the key is printable (produces a unicode character).
 
         Returns:
-            True if the key is printable.
+            `True` if the key is printable.
         """
         return False if self.character is None else self.character.isprintable()
 
@@ -327,15 +333,25 @@ def __init__(
     ) -> None:
         super().__init__()
         self.x = x
+        """The relative x coordinate."""
         self.y = y
+        """The relative y coordinate."""
         self.delta_x = delta_x
+        """Change in x since the last message."""
         self.delta_y = delta_y
+        """Change in y since the last message."""
         self.button = button
+        """Indexed of the pressed button."""
         self.shift = shift
+        """`True` if the shift key is pressed."""
         self.meta = meta
+        """`True` if the meta key is pressed."""
         self.ctrl = ctrl
+        """`True` if the ctrl key is pressed."""
         self.screen_x = x if screen_x is None else screen_x
+        """The absolute x coordinate."""
         self.screen_y = y if screen_y is None else screen_y
+        """The absolute y coordinate."""
         self._style = style or Style()
 
     @classmethod
@@ -380,20 +396,12 @@ def offset(self) -> Offset:
 
     @property
     def screen_offset(self) -> Offset:
-        """Mouse coordinate relative to the screen.
-
-        Returns:
-            Mouse coordinate.
-        """
+        """Mouse coordinate relative to the screen."""
         return Offset(self.screen_x, self.screen_y)
 
     @property
     def delta(self) -> Offset:
-        """Mouse coordinate delta (change since last event).
-
-        Returns:
-            Mouse coordinate.
-        """
+        """Mouse coordinate delta (change since last event)."""
         return Offset(self.delta_x, self.delta_y)
 
     @property
@@ -563,22 +571,24 @@ class Blur(Event, bubble=False):
 class AppFocus(Event, bubble=False):
     """Sent when the app has focus.
 
-    Only available when running within a terminal that supports `FocusIn`,
-    or when running via textual-web.
-
     - [ ] Bubbles
     - [ ] Verbose
+
+    Note:
+        Only available when running within a terminal that supports
+        `FocusIn`, or when running via textual-web.
     """
 
 
 class AppBlur(Event, bubble=False):
     """Sent when the app loses focus.
 
-    Only available when running within a terminal that supports `FocusOut`,
-    or when running via textual-web.
-
     - [ ] Bubbles
     - [ ] Verbose
+
+    Note:
+        Only available when running within a terminal that supports
+        `FocusOut`, or when running via textual-web.
     """
 
 
@@ -634,6 +644,7 @@ class Paste(Event, bubble=True):
     def __init__(self, text: str) -> None:
         super().__init__()
         self.text = text
+        """The text that was pasted."""
 
     def __rich_repr__(self) -> rich.repr.Result:
         yield "text", self.text
@@ -657,21 +668,26 @@ class ScreenSuspend(Event, bubble=False):
 
 @rich.repr.auto
 class Print(Event, bubble=False):
-    """Sent to a widget that is capturing prints.
+    """Sent to a widget that is capturing [`print`][print].
 
     - [ ] Bubbles
     - [ ] Verbose
 
     Args:
         text: Text that was printed.
-        stderr: True if the print was to stderr, or False for stdout.
+        stderr: `True` if the print was to stderr, or `False` for stdout.
 
+    Note:
+        Python's [`print`][print] output can be captured with
+        [`App.begin_capture_print`][textual.app.App.begin_capture_print].
     """
 
     def __init__(self, text: str, stderr: bool = False) -> None:
         super().__init__()
         self.text = text
+        """The text that was printed."""
         self.stderr = stderr
+        """`True` if the print was to stderr, or `False` for stdout."""
 
     def __rich_repr__(self) -> rich.repr.Result:
         yield self.text


Test patch: