Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Quality of Python Snippets, fixed issue with CONTRIBUTING.md #193

Merged
merged 11 commits into from
Jan 7, 2025

Conversation

MinerMinerMods
Copy link
Contributor

Description

Made Changes to Python snippets

  • Renamed snippets
    • truncate-string to truncate
    • remove-specific-characters to remove-characters
    • convert-string-to-ascii to convert-string-to-unicode
  • Replaced "..." with ellipses("…") to only use one character in truncate
  • Implemented toggle for the suffix "…" on string with default of True in truncate
  • added type-hints
  • Replaced references to ASCII with Unicode in convert-string-to-unicode
  • Kept ascii tag as it is a subset of unicode and to minimize search errors in convert-string-to-unicode

Made Changes to CONTRIBUTING.md

  • Added a not on line 68 in "Does that snippet have a real, and practical use case ?" to prevent useless snippets from being acceptable and useful snippets from being denied.

Type of Change

  • ✨ New snippet
  • 🛠 Improvement to an existing snippet
  • 🐞 Bug fix
  • 📖 Documentation update
  • 🔧 Other (please describe):
    Improved Clarity on the acceptance criteria

Checklist

  • I have tested my code and verified it works as expected.
  • My code follows the style and contribution guidelines of this project.
  • Comments are added where necessary for clarity.
  • Documentation has been updated (if applicable).
  • There are no new warnings or errors from my changes.

Related Issues

#192

Closes #

#192

Additional Context

Added type-hints to python snippets, fixed a semantic error in CONTRIBUTING.md, added functionality to opt out of the ellipsis in truncate.py, changed convert-string-to-ascii to better reflect function.

Renamed from `truncate-string.py` to `truncate.py`
Replaced "..." with ellipses("…") to only use one character
Implemented toggle for the `suffix` "…" on string with default of `True`
Added type hints
…tter functional representation

Renamed `convert-string-to-ascii.md` to `convert-string-to-unicode.md`
Replaced ASCII with Unicode
Kept `ascii` tag as it is a subset of unicode and to minimize search errors

Fixed issue dostonnabotov#192
Added a `not` on line 68 in "Does that snippet have a real, and practical use case ?" to prevent useless snippets from being acceptable and useful snippets from being denied.
recovered old attribution in the python snippet`truncate` to axorax and added the contributors tag.
Copy link
Collaborator

@majvax majvax left a comment

Choose a reason for hiding this comment

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

Hey, thanks for your contribution ! 🙌 However there are a few issues that need to be addressed to align with the repository's standards

  • PEP 8 Compliance
    Please ensure your code follows the PEP 8 standard by using 4 spaces for indentation instead of tabs. This is important for consistency and readability across the repository.

  • Horizontal Ellipsis (…) in truncate Function
    You used a horizontal ellipsis (…) instead of the standard "..." in your truncate function. Please stick to "..." for consistency and to avoid potential issues with encoding or readability.

Please make these changes so we could accept your snippets.

Replaced "…" with "..."
Updated Description to match
Ready for merge to parent repo
@MinerMinerMods
Copy link
Contributor Author

Conformed to PEP 8
Replaced '…' with '...' in the Python snippet truncate

followed change request
@MinerMinerMods MinerMinerMods requested a review from majvax January 5, 2025 18:04
Copy link
Collaborator

@Mathys-Gasnier Mathys-Gasnier left a comment

Choose a reason for hiding this comment

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

Hey, thanks for the contribution, I notice that a lot of checks of checkSnippetFormatting.js are not passing. Please ensure it runs, and snippets have no issue before opening a pull request

CONTRIBUTING.md Show resolved Hide resolved
snippets/python/string-manipulation/remove-characters.md Outdated Show resolved Hide resolved
snippets/python/string-manipulation/truncate.md Outdated Show resolved Hide resolved
@Mathys-Gasnier Mathys-Gasnier merged commit 52e7c9c into dostonnabotov:main Jan 7, 2025
2 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.

3 participants