Skip to content

Fix duplicate-word typos in docstrings#2101

Merged
bboe merged 1 commit into
praw-dev:mainfrom
Labib-Bin-Salam:fix-docstring-typos
Jun 7, 2026
Merged

Fix duplicate-word typos in docstrings#2101
bboe merged 1 commit into
praw-dev:mainfrom
Labib-Bin-Salam:fix-docstring-typos

Conversation

@Labib-Bin-Salam

Copy link
Copy Markdown
Contributor

Summary

Two public API docstrings contain accidental repeated words. This fixes both:

  • Redditor.multireddits — "For example, to to get ..." → "For example, to get ..." (praw/models/reddit/redditor.py)
  • UserSubreddit subscribers attribute — "Count of subscribers. This will be 0 unless unless the authenticated user is a moderator." → "... 0 unless the ..." (praw/models/reddit/user_subreddit.py)

Both strings render in the published API documentation, so the typos are user-visible.

Changes

  • Fix the two duplicate-word typos.
  • Add myself to the Documentation Contributors list in AUTHORS.rst (per the contributing guide, for a first contribution).

No CHANGES.rst entry, as this is a documentation-only fix with no behavioral change.

Verification

  • ruff check passes on both edited files.
  • The user_subreddit.py edit keeps the RST simple-table wrapping intact (the description column is 58 chars wide; the edited line is well within it and the following word still wraps to the next line), so docstrfmt reformats nothing.

@Labib-Bin-Salam

Copy link
Copy Markdown
Contributor Author

Heads-up on the red CI: the failing docstrfmt lint check is not caused by this change. docstrfmt 2.0.2 crashes during CLI argument parsing under click >= 8.2 (TypeError: main() missing 1 required positional argument: 'section_adornments'), before it reads any file — so it fails on every current PR (the last green main run was 2026-04-27).

The other lint hooks (Static Word Checks, Check Documentation, ruff) all pass here, and running docstrfmt with click pinned < 8.2 formats both edited files cleanly (Done! 🎉), so this change is correctly formatted.

I opened #2102 to pin click < 8.2 on the docstrfmt hook so lint CI goes green again. Once that lands and this branch is rebased, the check here should pass.

@Labib-Bin-Salam

Copy link
Copy Markdown
Contributor Author

Updated: I folded the click<8.2 pin for the docstrfmt hook into this PR (the fix originally proposed in #2102), so the lint CI here now passes on its own rather than depending on a separate PR. The change set is now:

  • the two docstring typo fixes,
  • AUTHORS.rst entry, and
  • a one-line additional_dependencies: ["click<8.2"] on the docstrfmt pre-commit hook, with a comment explaining why.

Closing #2102 as superseded by this. Happy to split it back out if you'd prefer the tooling fix as a standalone PR.

Remove accidental repeated words in two public API docstrings:

- Redditor.multireddits: "to to get" -> "to get"
- UserSubreddit ``subscribers`` attribute: "unless unless the" ->
  "unless the"

Both render in the published API documentation. Also add myself to the
Documentation Contributors list in AUTHORS.rst.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bboe bboe force-pushed the fix-docstring-typos branch from 36f8dfa to f4fca92 Compare June 7, 2026 06:34
@bboe

bboe commented Jun 7, 2026

Copy link
Copy Markdown
Member

I rebased this onto main and dropped the click<8.2 pin commit — an equivalent pin (click<8.4) landed in #2104, so only the typo fixes and AUTHORS.rst entry remain. Thanks for root-causing the docstrfmt/click breakage independently!

@bboe bboe merged commit 342cd98 into praw-dev:main Jun 7, 2026
12 checks passed
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.

2 participants