Skip to content

Conversation

@electron271
Copy link
Member

@electron271 electron271 commented Aug 28, 2024

Description

Fixes #471

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other: (write here)

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 followed all of these guidelines.

How Has This Been Tested? (if applicable)

i ran the snippet command for both locked and unlocked snippets

Summary by Sourcery

Add a feature to show a lock emoji in the snippet display if the snippet is locked, enhancing the user interface to indicate locked snippets.

New Features:

  • Display a lock emoji next to the snippet name if the snippet is locked.

@electron271 electron271 linked an issue Aug 28, 2024 that may be closed by this pull request
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Aug 28, 2024

Reviewer's Guide by Sourcery

This pull request adds a feature to display a lock emoji (🔒) next to the snippet name if the snippet is locked. The change is implemented in the get_snippet function within the snippets.py file.

File-Level Changes

Change Details Files
Added conditional display of lock emoji for locked snippets
  • Replaced single-line text assignment with multi-line construction
  • Added a condition to check if the snippet is locked
  • Appended lock emoji to the text if the snippet is locked
tux/cogs/utility/snippets.py

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

@electron271 electron271 self-assigned this Aug 28, 2024
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 and they look great!

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 to tell me if it was helpful.

@electron271 electron271 merged commit e5cbd34 into main Aug 28, 2024
@electron271 electron271 deleted the 471-footer-for-protected-snippets branch August 28, 2024 18:18
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.

footer for protected snippets

2 participants