Add cases output in fun cog.#1457
Conversation
shtlrs
left a comment
There was a problem hiding this comment.
Looks good & works well, thanks!
hedyhli
left a comment
There was a problem hiding this comment.
I can see that pretty much all the functionalities are there, well done! I have a few comments.
hedyhli
left a comment
There was a problem hiding this comment.
Looks good and works well, just a few trivial comments.
| cleaned_text, embed = await self._clean_text(ctx, text, conversion_func) | ||
| await ctx.send(content=cleaned_text, embed=embed) | ||
|
|
||
| @commands.command(name="screamingsnakecase", aliases=("screamsnake", "ssnake", "screamingsnake",)) |
There was a problem hiding this comment.
| @commands.command(name="screamingsnakecase", aliases=("screamsnake", "ssnake", "screamingsnake",)) | |
| @commands.command(name="screamingsnakecase", aliases=("screamsnake", "ssnake", "screamingsnake", "sscase")) |
How about having a*case alias for all our case commands? It made sense to me during testing and was surprised it wasn't already added 😄
| def neutralise_string(txt: str | None) -> list[str] | None: | ||
| """Attempts to neutralise all punctuation and cases and returns a string of lowercase words.""" |
There was a problem hiding this comment.
The docstring would have to be updated to reflect the new function. Maybe the name too, up to you.
| def neutralise_string(txt: str | None) -> list[str] | None: | |
| """Attempts to neutralise all punctuation and cases and returns a string of lowercase words.""" | |
| def split_words(txt: str | None) -> list[str] | None: | |
| """Neutralise all punctuation and cases and return a list of separated words.""" |
| text = helpers.neutralise_string(text) | ||
| return "_".join( | ||
| text | ||
| ) |
There was a problem hiding this comment.
Consider making the variable name of the returned value more meaningful since the helper function was updated, and it's not immediately obvious that the text is actually a list here.
| text = helpers.neutralise_string(text) | |
| return "_".join( | |
| text | |
| ) | |
| words = helpers.neutralise_string(text) | |
| return "_".join(words) |
Note that this also applies to the conversion_func for other case commands :)
|
@JelmerKorten Hello! Will you be able to finish up this PR? Thanks! |
|
Howzit!
I can definitely try.
To be very honest, I thought it was finished and accepted a long time ago.
Tried to use it on the server a few weeks back and it didn’t work.
I’ll get to it probably at the end of next week.
Thanks for the reminder!
…On Fri, 5 Jul 2024 at 04:07, Xithrius ***@***.***> wrote:
@JelmerKorten <https://github.com/JelmerKorten> Hello! Will you be able
to finish up this PR? Thanks!
—
Reply to this email directly, view it on GitHub
<#1457 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASFCDLYA5GQPLVNIGW54QATZKXPUXAVCNFSM6AAAAABDMOOVYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBZGY2TIOJYHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
Thanks for the quick response! No rush. If you need any help completing this PR, don't hesitate to ask. |
|
Closing due to inactivity for now, please comment if this is something you'd like re-opening to work on in future! |
Closes #707 if approved.
(new PR because of branch)
Description
PascalCase, camelCase, snake_case, SCREAMING_SNAKE_CASE
.pascalcase aliases [.pascal .pcase]
.camelcase aliases [.camel .ccase]
.snakecase alias [.scase]
.screamingsnakecase aliases [.screamsnake .ssnake .screamingsnake]
Did you: