Skip to content

Improve docstring coverage across cogs#132

Merged
psykzz merged 2 commits intomainfrom
claude/improve-docstring-coverage
Mar 28, 2026
Merged

Improve docstring coverage across cogs#132
psykzz merged 2 commits intomainfrom
claude/improve-docstring-coverage

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Mar 28, 2026

Several cogs had missing or malformed docstrings, reducing code discoverability and breaking Red-bot's help command generation.

Changes

Fixed incorrect docstring format:

  • misc/misc.py: Converted single-quoted string to proper triple-quoted docstring
    # Before: "Misc things for your server" (not recognized by __doc__)
    # After:  """Misc things for your server."""

Added class-level docstrings:

  • quotesdb/quotedb.py: Added comprehensive cog description
  • empty_voices/api.py: Added cog description explaining automatic voice channel management

Added NumPy-style parameter documentation:

  • empty_voices/api.py: Added Parameters sections to 4 helper methods (cleanup_temp_channels_config, try_delete_channel, validate_category, try_rename_channel)
    async def try_delete_channel(self, guild: discord.Guild, channel: discord.VoiceChannel, should_keep=False):
        """Check if this channel is empty, and delete it
    
        Parameters
        ----------
        guild : discord.Guild
            The guild containing the channel
        channel : discord.VoiceChannel
            The voice channel to check and potentially delete
        should_keep : bool, optional
            If True, skip deletion even if channel is empty (default: False)
        """

Notes

Modal/View classes in party/party.py, helper methods in secret_santa/secret_santa.py, and helper functions in albion_ava/ava.py already have proper docstrings.

@Claude Claude AI assigned Claude and psykzz Mar 28, 2026
@Claude Claude AI linked an issue Mar 28, 2026 that may be closed by this pull request
- Fix misc/misc.py: Convert single-quoted string to proper docstring
- Add class docstring to quotesdb/quotedb.py
- Add class docstring to empty_voices/api.py
- Add parameter documentation to empty_voices helper methods

Agent-Logs-Url: https://github.com/psykzz/cogs/sessions/e409ea9f-6a28-4b48-9a23-441927ba377c

Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Update docstring coverage for several cogs Improve docstring coverage across cogs Mar 28, 2026
@Claude Claude AI requested a review from psykzz March 28, 2026 10:55
@psykzz psykzz marked this pull request as ready for review March 28, 2026 11:12
@psykzz psykzz merged commit 1f0bc27 into main Mar 28, 2026
2 checks passed
@psykzz psykzz deleted the claude/improve-docstring-coverage branch March 28, 2026 11:12
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.

📝 Improve docstring coverage across cogs

2 participants