Skip to content

Fix docstring Args names that do not match the signatures - #6685

Open
darkdi wants to merge 2 commits into
Textualize:mainfrom
darkdi:fix/docstring-arg-names
Open

Fix docstring Args names that do not match the signatures#6685
darkdi wants to merge 2 commits into
Textualize:mainfrom
darkdi:fix/docstring-arg-names

Conversation

@darkdi

@darkdi darkdi commented Aug 5, 2026

Copy link
Copy Markdown

Twenty-six Args: entries name a parameter the function does not have. Docstring only — no behaviour changes, no signatures touched.

Most are plain renames where the docstring kept the old name:

Where Documented Actual
_binary_encode.encode_none datum _datum
_loop.loop_from_index bool wrap
_styles_cache.render_widget region crop
containers.ScrollableContainer can_maximized can_maximize
BoxProperty.__set__ value border
SpacingProperty.__set__ style spacing
FractionalProperty.__get__ objtype type
SyntaxAwareDocument.get_line line_index index
Driver.process_message event message
LinuxDriver._patch_lflag (and the inline driver) attributes attrs
WidgetPlacement.translate offset translate_offset
Screen.arrange optimal _optimal
Padding.__init__ Visual visual
walk_selectable_widgets bounded containers
ChopsUpdate.__init__ crop spans
FuzzySearch.score search candidate, positions

The rest document a parameter that is simply gone: console in render_border_label, StylesCache.render and render_line; start in Clock.__init__; num_values_supplied in scalar_help_text; path in Stylesheet.add_source; background in TextOpacity.process_segments; container_width in Visual.get_minimal_width; and compose_parent in _initialize_data_bind, which takes no arguments at all.

Three needed a description rather than a rename, since the old text described the wrong thing:

  • ChopsUpdate.__init__spans is the (y, x1, x2) list iterated in __rich_console__, not a crop region.
  • SpacingProperty.__set__ — the old entry described a Style; the argument is SpacingDimensions.
  • FuzzySearch.score — split into the two arguments it actually takes.

Every one was opened and read against its signature. black --check passes on all touched files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant