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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

### Fixed

- Fixed 26 docstring `Args:` entries that named a parameter the function does not take https://github.com/Textualize/textual/pull/6685

## [8.2.8] - 2026-06-30

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/textual/_binary_encode.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def encode_none(_datum: None) -> bytes:
Encodes a None value.

Args:
datum: Always None.
_datum: Always None.

Returns:
None encoded.
Expand Down
1 change: 0 additions & 1 deletion src/textual/_border.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ def render_border_label(
inner_style: The inner style (widget background).
outer_style: The outer style (parent background).
style: Widget style.
console: The console that will render the markup in the label.
has_left_corner: Whether the border edge will have to render a left corner.
has_right_corner: Whether the border edge will have to render a right corner.

Expand Down
2 changes: 1 addition & 1 deletion src/textual/_compositor.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def __init__(

Args:
chops: A mapping of offsets to list of segments, per line.
crop: Region to restrict update to.
spans: A list of `(y, x1, x2)` spans to update.
chop_ends: A list of the end offsets for each line
"""
self.chops = chops
Expand Down
2 changes: 1 addition & 1 deletion src/textual/_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def loop_from_index(
values: A sequence of values.
index: Starting index.
direction: Direction to move index (+1 for forward, -1 for backward).
bool: Should the index wrap when out of bounds?
wrap: Should the index wrap when out of bounds?

Yields:
A tuple of index and value from the sequence.
Expand Down
4 changes: 1 addition & 3 deletions src/textual/_styles_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def render_widget(self, widget: Widget, crop: Region) -> list[Strip]:

Args:
widget: A widget.
region: A region of the widget to render.
crop: A region of the widget to render.

Returns:
Rendered lines.
Expand Down Expand Up @@ -185,7 +185,6 @@ def render(
base_background: Background color beneath widget.
background: Background color of widget.
render_content_line: Callback to render content line.
console: The console in use by the app.
border_title: Optional tuple of (title, color, background, style).
border_subtitle: Optional tuple of (subtitle, color, background, style).
content_size: Size of content or None to assume full size.
Expand Down Expand Up @@ -291,7 +290,6 @@ def render_line(
base_background: Background color of widget beneath this line.
background: Background color of widget.
render_content_line: Callback to render a line of content.
console: The console in use by the app.
border_title: Optional tuple of (title, color, background, style).
border_subtitle: Optional tuple of (subtitle, color, background, style).
opacity: Opacity of line.
Expand Down
1 change: 0 additions & 1 deletion src/textual/clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def __init__(self, *, get_time: Callable[[], float] = monotonic) -> None:

Args:
get_time: A callable to get time in seconds.
start: Start the clock (time is 0 unless clock has been started).
"""
self._get_time = get_time
self._start_time = self._get_time()
Expand Down
2 changes: 1 addition & 1 deletion src/textual/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(
disabled: Whether the widget is disabled or not.
can_focus: Can this container be focused?
can_focus_children: Can this container's children be focused?
can_maximized: Allow this container to maximize? `None` to use default logic.,
can_maximize: Allow this container to maximize? `None` to use default logic.
"""

super().__init__(
Expand Down
1 change: 0 additions & 1 deletion src/textual/css/_help_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def scalar_help_text(

Args:
property_name: The name of the property.
num_values_supplied: The number of values the user supplied (a number other than 1, 2 or 4).
context: The context the scalar property is being used in.

Returns:
Expand Down
7 changes: 3 additions & 4 deletions src/textual/css/_style_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def __set__(

Args:
obj: The ``Styles`` object.
value: A 2-tuple containing the type of box to use,
border: A 2-tuple containing the type of box to use,
e.g. "dashed", and the ``Style`` to be used. You can supply the ``Style`` directly, or pass a
``str`` (e.g. ``"blue on #f0f0f0"`` ) or ``Color`` instead.

Expand Down Expand Up @@ -563,8 +563,7 @@ def __set__(self, obj: StylesBase, spacing: SpacingDimensions | None):

Args:
obj: The ``Styles`` object.
style: You can supply the ``Style`` directly, or a
string (e.g. ``"blue on #f0f0f0"``).
spacing: A single integer, or a ``tuple`` of 1, 2, or 4 integers.

Raises:
ValueError: When the value is malformed,
Expand Down Expand Up @@ -1164,7 +1163,7 @@ def __get__(self, obj: StylesBase, type: type[StylesBase]) -> float:

Args:
obj: The ``Styles`` object.
objtype: The ``Styles`` class.
type: The ``Styles`` class.

Returns:
The value of the property (in the range (0, 1)).
Expand Down
1 change: 0 additions & 1 deletion src/textual/css/stylesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ def add_source(
Args:
css: String with CSS source.
read_from: The original source location of the CSS.
path: The path of the source if a file, or some other identifier.
is_default_css: True if the CSS is defined in the Widget, False if the CSS is defined
in a user stylesheet.
tie_breaker: Integer representing the priority of this source.
Expand Down
2 changes: 1 addition & 1 deletion src/textual/document/_syntax_aware_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def get_line(self, index: int) -> str:
"""Return the string representing the line, not including new line characters.

Args:
line_index: The index of the line.
index: The index of the line.

Returns:
The string representing the line.
Expand Down
6 changes: 1 addition & 5 deletions src/textual/dom.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,7 @@ def compose(self) -> ComposeResult:
return self

def _initialize_data_bind(self) -> None:
"""initialize a data binding.

Args:
compose_parent: The node doing the binding.
"""
"""initialize a data binding."""
if not self._reactive_connect:
return
for variable_name, (compose_parent, reactive) in self._reactive_connect.items():
Expand Down
2 changes: 1 addition & 1 deletion src/textual/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def process_message(self, message: messages.Message) -> None:
"""Perform additional processing on a message, prior to sending.

Args:
event: A message to process.
message: A message to process.
"""
# NOTE: This runs in a thread.
# Avoid calling methods on the app.
Expand Down
2 changes: 1 addition & 1 deletion src/textual/drivers/linux_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def _patch_lflag(cls, attrs: int) -> int:
"""Patch termios lflag.

Args:
attributes: New set attributes.
attrs: New set attributes.

Returns:
New lflag.
Expand Down
2 changes: 1 addition & 1 deletion src/textual/drivers/linux_inline_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def _patch_lflag(cls, attrs: int) -> int:
"""Patch termios lflag.

Args:
attributes: New set attributes.
attrs: New set attributes.

Returns:
New lflag.
Expand Down
3 changes: 2 additions & 1 deletion src/textual/fuzzy.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def score(self, candidate: str, positions: Sequence[int]) -> float:
"""Score a search.

Args:
search: Search object.
candidate: The string that was matched.
positions: Offsets of the matched characters within the candidate.

Returns:
Score.
Expand Down
2 changes: 1 addition & 1 deletion src/textual/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def translate(

Args:
placements: List of placements.
offset: Offset to add to placements.
translate_offset: Offset to add to placements.

Returns:
Placements with adjusted region, or same instance if offset is null.
Expand Down
1 change: 0 additions & 1 deletion src/textual/renderables/text_opacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def process_segments(
segments: Incoming segments.
opacity: Opacity to apply.
ansi_theme: Terminal theme.
background: Color of background.
native_ansi: Allow ANSI colors.

Returns:
Expand Down
2 changes: 1 addition & 1 deletion src/textual/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ def arrange(self, size: Size, _optimal: bool = False) -> DockArrangeResult:

Args:
size: Size of container.
optimal: Ignored on screen.
_optimal: Ignored on screen.

Returns:
Widget locations.
Expand Down
4 changes: 1 addition & 3 deletions src/textual/visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ def get_minimal_width(self, rules: RulesMap) -> int:

Args:
rules: A mapping of style rules, such as the Widgets `styles` object.
container_width: The width of the container, used by Rich Renderables.
May be ignored for Textual Visuals.

Returns:
A width in cells.
Expand Down Expand Up @@ -367,7 +365,7 @@ def __init__(self, visual: Visual, spacing: Spacing) -> None:
"""

Args:
Visual: A Visual.
visual: A Visual.
spacing: A Spacing object containing desired padding dimensions.
"""
self._visual = visual
Expand Down
2 changes: 1 addition & 1 deletion src/textual/walk.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def walk_selectable_widgets(
Args:
root: The root note (starting point).
bounds: A Shape object that defines the selection bounds.
bounded: Container widgets that require a bounds check.
containers: Container widgets that require a bounds check.

Returns:
An iterable of DOMNodes.
Expand Down