Skip to content

Conversation

@electron271
Copy link
Member

@electron271 electron271 commented Apr 18, 2025

Description

Sorry for having pre-commit in this pr, could not commit the original purpose of this pr without fixing.
TopSnippets is now superseded by $ls which also sorts by uses.

Guidelines

  • My code follows the style guidelines of this project (formatted with Ruff)

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation if needed

  • My changes generate no new warnings

  • I have tested this change

  • Any dependent changes have been merged and published in downstream modules

  • I have added all appropriate labels to this PR

  • I have followed all of these guidelines.

How Has This Been Tested? (if applicable)

Tried running $ts

Screenshots (if applicable)

Please add screenshots to help explain your changes.

Additional Information

Closes #810

Summary by Sourcery

Remove TopSnippets cog and update pre-commit configuration

Build:

  • Update Python version in pre-commit configuration from '3.13.2' to 'python3.13'

Chores:

  • Remove TopSnippets cog from the project

@electron271 electron271 added type: bug category: commands category: meta Relating to architecture, systems and critical functions priority: critical labels Apr 18, 2025
@electron271 electron271 requested a review from a user April 18, 2025 14:56
@electron271 electron271 self-assigned this Apr 18, 2025
@electron271 electron271 linked an issue Apr 18, 2025 that may be closed by this pull request
@trunk-io
Copy link

trunk-io bot commented Apr 18, 2025

⏱️ 3m total CI duration on this PR

Job Cumulative Duration Recent Runs
docker 2m 🟩
Analyze (python) 59s 🟩
pyright 32s 🟩
Ruff 22s 🟩

settingsfeedbackdocs ⋅ learn more about trunk.io

@trunk-io
Copy link

trunk-io bot commented Apr 18, 2025

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Apr 18, 2025

Reviewer's Guide by Sourcery

This pull request removes the TopSnippets cog, as its functionality is now covered by the $ls command. Additionally, it fixes the pre-commit configuration by updating the default Python version in .pre-commit-config.yaml.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Removal of the TopSnippets cog due to its functionality being superseded by the $ls command. tux/cogs/snippets/top_snippets.py
Updated the .pre-commit-config.yaml file to correct the default Python version.
  • Changed 3.13.2 to python3.13 for the default Python version.
.pre-commit-config.yaml

Assessment against linked issues

Issue Objective Addressed Explanation
#810 Address the potential need for pagination in the top_snippets command if the list of snippets becomes very long. The PR removes the top_snippets command entirely, rather than implementing pagination.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @electron271 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • It's good that you fixed the pre-commit issues, but try to avoid mixing unrelated changes in the same PR in the future.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@ghost ghost merged commit 45e00f0 into main Apr 18, 2025
9 checks passed
@ghost ghost deleted the 810-consider-adding-pagination-if-the-list-becomes-very-long branch April 18, 2025 15:41
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: commands category: meta Relating to architecture, systems and critical functions priority: critical

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider adding pagination if the list becomes very long

2 participants